RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details E-Mail Address by RFC2822 and RFC1035
Expression
^([A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\}\|\~]+|"([\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|\\[\x0-\x7F])*")(\.([A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\}\|\~]+|"([\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|\\[\x0-\x7F])*"))*@([A-Za-z0-9]([A-Za-z0-9\-]*[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9\-]*[A-Za-z0-9])?)*|(1[0-9]{0,2}|2([0-4][0-9]?|5[0-4]?|[6-9])?|[3-9][0-9]?)(\.(0|1[0-9]{0,2}|2([0-4][0-9]?|5[0-5]?|[6-9])?|[3-9][0-9]?)){2}\.(1[0-9]{0,2}|2([0-4][0-9]?|5[0-4]?|[6-9])?|[3-9][0-9]?))$
Description
This will match any valid RFC2822 e-mail address typed into web forms. If does not support comments, display name, or line folding. It does support quoted-strings in the local-part and domains by the RFC 1035 and proper ip addresses. It does relax the RFC1035 rule of not allowing numbers as the first character of a domain name (since they do exist in real life)
Matches
[email protected]|six."Hello\ There"@yahoo.com|[email protected]|Most any valid e-mail
Non-Matches
Don't know any
Author Rating: The rating for this expression. Matthew
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials