I've been banging my head against the wall with this one, and regex is not my strong suit anyhow. I have no control over the built string to start (the CFPop tag in ColdFusion generates it). The trouble comes in when there are entries with commas in them as well (eg "grey, morgan" greykher@nospam.com).
What I need is to use REReplace() or similar to change a string that looks like:
"grey, morgan" <greykher@nospam.com>,spamfree@nospam.com
to:
"grey, morgan" <greykher@nospam.com>;spamfree@nospam.com
Change the comma between addresses to semicolon, but leave the comma in the display names alone. I found this ""[^""]*""|[^,]+ at (http://regexadvice.com/blogs/wayneking/archive/2004/01/12/271.aspx) that says it does this, but testing has it matching the comma inside the quotes as well. To me, this seems like it should be as simple as matching all the commas that are not inside quotes, but I can't get it to work so I'm open to any suggestions. If I can find a RegEx that will match right, I can get the REReplace() to work, no problem.
thanks
-morgan