3 ms·
Not sure what language you use, but it almost definitely supports PCRE. For email addresses, I always use this regex: http://www.regular-expressions.info/emai
by jontas 13y ago
Not sure what language you use, but it almost definitely supports PCRE. For email addresses, I always use this regex:
http://www.regular-expressions.info/email.html http://www.regular-expressions.info/email.html
I've yet to run into a problem with it. If you want to extract an address from a larger string, then you need to slightly modify the regex to capture the email address from the string. This is going to depend somewhat on the language you're using, but probably involves wrapping everything between the first \b and the last \b in parentheses.
I guess if I were certain that the target text was a "<name>" user@domain.com style string, I probably wouldn't use a regex (unnecessary overhead) and just split on > and trim or something silly like that.