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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$
Description
Matches e-mail addresses, including some of the newer top-level-domain extensions, such as info, museum, name, etc. Also allows for emails tied directly to IP addresses.
Matches
Non-Matches
broken@@example.com | [email protected] | [email protected]
Author Rating: The rating for this expression. David Huyck
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: Invalid
Name: jk
Date: 9/8/2017 7:10:38 PM
Comment:
doesn't allow [email protected]


Title: DONT COPY THIS EXAMPLE
Name: Cris
Date: 4/30/2012 7:34:58 PM
Comment:
This is (another) bad email regex that (in particular) doesn't support the plus (+) character in the local part. "Plus addressing" is widely used (even by gmail!) and this is very very annoying...


Title: Domain cannot start with a hyphen
Name: Sascha
Date: 1/7/2012 6:18:19 PM
Comment:
This example: [email protected] will give a positive match. After some research I am pretty sure that domains or subdomains cannot start with a hyphen.


Title: Small update
Name: Garrett Reid
Date: 5/19/2008 5:43:58 PM
Comment:
This will fix the small RFC compliance problem mentioned earlier: [_a-zA-Z0-9-"'\/]+(\.[_a-zA-Z0-9-"'\/]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))


Title: Small update
Name: Garrett Reid
Date: 5/19/2008 5:43:58 PM
Comment:
This will fix the small RFC compliance problem mentioned earlier: [_a-zA-Z0-9-"'\/]+(\.[_a-zA-Z0-9-"'\/]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))


Title: Small update
Name: Garrett Reid
Date: 5/19/2008 5:43:58 PM
Comment:
This will fix the small RFC compliance problem mentioned earlier: [_a-zA-Z0-9-"'\/]+(\.[_a-zA-Z0-9-"'\/]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))


Title: Check out up-to-date TLDs
Name: Kivanc Anar
Date: 1/18/2008 3:20:15 PM
Comment:
http://data.iana.org/TLD/tlds-alpha-by-domain.txt


Title: RUNESCAPE
Name: NADEEM128
Date: 7/25/2007 3:36:50 AM
Comment:
I NEED BACK MY ACCOUNT,PLEAES


Title: RUNESCAPE
Name: NADEEM128
Date: 7/25/2007 3:35:43 AM
Comment:
I NEED BACK MY ACCOUNT,PLEAES


Title: i need 190 mil free
Name: king ryan379
Date: 3/13/2007 6:53:03 PM
Comment:
i need this to inpress my freinds


Title: Works on basic emails just fine
Name: LHD
Date: 11/30/2006 12:10:57 PM
Comment:
This using some of the standard emails in sue at a client's site and it works fine in all cases.


Title: Fails valid email addresses with + addressing
Name: Tim lesher
Date: 5/22/2006 2:56:04 PM
Comment:
This fails on the valid "plus-addressing" technique used by Gmail: [email protected]


Title: Fails to match valid email address
Name: The Fred and Barney Comedy Team <fred&[email protected]>
Date: 1/26/2005 3:41:42 AM
Comment:
Fails to match the valid email address fred&[email protected]


Title: only it doesn't work
Name: pinetree
Date: 6/16/2003 4:02:04 PM
Comment:
Except that per RFC 822 (http://www.w3.org/Protocols/rfc822/Overview.html), the following email addresses are valid but would be trapped as invalid by this code. Specifically, look at Appendix A (http://www.w3.org/Protocols/rfc822/Overview.html#z10), section A.3.3.<br><br> "Some Silly User"@example.com<br> Another'[email protected]<br> Yet/Another/Wacky/[email protected]


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