Email > Email address (RFC 822) Favorite

Source: http://www.iamcal.com/publish/articles/php/parsing_email/

Validates an email address, RFC compliant version
by Cal Henderson
http://www.w3.org/Protocols/rfc822/

Sample Matches
Text Result
account@example.com
Group #0
account@example.com
Group #1
account
Group #6
example
Group #8
.com
Group #9
com
match
@example.comno match
account@no match
account@example
Group #0
account@example
Group #1
account
Group #6
example
match
example.comno match