In my SQL, I have some rows that contain email senders. Those senders are strings and not separated via columns.
This is 1 example from my row.
"Test Example" <[email protected]>, "Second Person" <[email protected]>, [email protected]
As you can see, it's plain text and ready for explode. I can explode it with comma and separate them.
But today I realized this example:
"Test, Example" <[email protected]>, "Second Person" <[email protected]>, [email protected]
As you see, Test has a comma in its name. So if I explode it, it will explode Test too. This will cause an error.
I tried some regex but with no luck. Could anyone suggest to me the best regex to explode them but not names?
FYI, names always in "" tag. So commas are not.
I simply need to pass if comma is in quotes.