Return to Snippet

Revision: 17696
at September 11, 2009 14:20 by chrisdpratt


Initial Code
[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?

Initial URL
http://www.regular-expressions.info/email.html

Initial Description
This regular expression will match almost all valid email addresses. Omits email addresses containing double-quotes and square brackets, which while valid according to [RFC 2822][rfc2822], are almost never used.

[rfc2822]: http://tools.ietf.org/html/rfc2822 "RFC 2822"

Initial Title
RFC 2822-compliant (mostly) Email Address Regular Expression

Initial Tags
email

Initial Language
Regular Expression