Parsing email addresses
Posted on 2006-10-20
I need to parse a string like this :
<firstname.lastname@example.org>,"first name" <email@example.com>,"firstname lastname" <firstname.lastname@example.org>, "firstname, lastname" <email@example.com>,firstname.lastname@example.org
So basically, I need to get all emails, and of course the corresponding name if any.
The problem is in the fourth email. You see, the guy put a , in his name, so parsing using .Split(',') will not work.
I'm searching for a solution to be able to get both name and address in all cases.
Thanks a lot!