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 Almost RFC2822 Compliant Email Address Check
Expression
^(?:(?#local-part)(?#quoted)"[^\"]*"|(?#non-quoted)[a-z0-9&+_-](?:\.?[a-z0-9&+_-]+)*)@(?:(?#domain)(?#domain-name)[a-z0-9](?:[a-z0-9-]*[a-z0-9])*(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])*)*|(?#ip)(\[)?(?:[01]?\d?\d|2[0-4]\d|25[0-5])(?:\.(?:[01]?\d?\d|2[0-4]\d|25[0-5])){3}(?(1)\]|))$
Description
Validates an RFC 2822 email address, except does not allow most punctuation and non-ascii alphanumeric characters. Also does not take length requirements into account. Allows domain name and IP addresses, but ensures that the IP address entered is valid.
Matches
[email protected]|[email protected]|user@[127.0.0.1]|[email protected]|"user"@domain.com
Non-Matches
userdomain.com|[email protected]|user@[127.0.0.1|[email protected]|user@"domain.com"
Author Rating: The rating for this expression. Daniel
   Displaying page 1 of 1 pages; Items 1 to 1

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