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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Email - RFC 3696
Expression
^[a-z0-9!$'*+\-_]+(\.[a-z0-9!$'*+\-_]+)*@([a-z0-9]+(-+[a-z0-9]+)*\.)+([a-z]{2}|aero|arpa|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|travel)$
Description
Checks email format against RFC 3696 (http://tools.ietf.org/html/rfc3696). Allows all characters described in Sections 2 and 3 of the RFC EXCEPT those described in Section 4.3 as unsafe for mailto URLs without encoding. Allows any 2-letter TLD plus any of the current gTLDs as listed at http://www.icann.org/registries/top-level-domains.htm. Does not accept quoted strings in the local part or IP addresses in lieu of the domain name. Does not enforce length limits. Intended to be used as case-insensitive. Comments are appreciated!
Matches
Non-Matches
Author Rating: Not yet rated. David Thompson
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: one possible "right" solution
Name: Randal L. Schwartz
Date: 9/21/2007 10:15:07 PM
Comment:
See http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html for the minimal regex to match RFC2822. And it's far longer than this.


Title: Wrong? Why
Name: Traber
Date: 10/30/2006 10:54:12 PM
Comment:
If you know it to be wrong, please explain. Pointlessly denigrating someone else's work is not particularly helpful.


Title: WRONG WRONG WRONG
Name: Randal L. Schwartz
Date: 10/8/2006 1:15:59 PM
Comment:
Once again, someone who is ignoring RFC822 and RFC2822 but calling it "email address validation". DO NOT USE THIS REGEX. The tireless patrolling I have to do here. :(


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