I need to extract the email address out of this mailbox string.
I thought of str_replace but the display name and the email address is not static so I don’t know how to do this using regular expressions.
Example: “My name <email@example.com>” should result in “email@example.com“.
Any ideas?
Thanks
Matthy
at face value, the following will work:
but i have a sneaking suspicion you need something better than that. There are a ton of “official” email regex patterns out there, and you should be a bit more specific about the context and rules of the match.