I need a regex which match in all cases the associate email address of the from 'tag'.
Examples:
From: =?iso-8859-1?Q?First_Second_=28Company_Inc=29?=
<[email protected]>
From: =?iso-8859-1?Q?First_Second_=28Company_Inc=29?=
<[email protected]>
From: =?iso-8859-1?Q?First_Second_=28Company_Inc=29?=
[email protected]
From: =?iso-8859-1?Q?First_Second_=28Company_Inc=29?=
[email protected]
From: [email protected]
From: <[email protected]>
I tried different patterns (RegexOptions.Multiline) but probably took a false approach. The one listed below matches not to the second to last.
^From: ([^<>\r\n]+([ |\r\n|\r|\n][\t| ])?)?[<]?([^<>]+)[>]?$
Thanks in advance.
Kinde regards,
Danny