4 ms·
apparently this is the correct fully rfc-compliant email validation regex: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html http://www.ex-parrot.com/pdw/M
by AdrianRossouw 13y ago
apparently this is the correct fully rfc-compliant email validation regex:
http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
- btilly 13y agoOnly if you do not add comments. There was a fun proposal to avoid spam by adding comments inside your email address. Any true emailer should handle it. And regex should break. Unfortunately Microsoft Exchange breaks. And that case is important enough that the idea never caught on.
- vacri 13y agoThese guys say that a 430-character regex does the same trick as that 6k-character one (down in the RFC 2822 section) http://www.regular-expressions.info/email.html http://www.regular-expressions.info/email.html
- simpleigh 13y agoI might be wrong, but ISTR that no longer works 'cause RFC822 has been superseded (the new RFC extends the domain of valid addresses). The term "works" is relative of course - I don't suppose anyone actually uses that regex!