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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$
Description
Much simpler email expression. This one forces a length of 2 or 3, which fits current specs, but you may need to alter the end as this one allows all numerals on the .COM section.
Matches
a@a.com | a@a.com.au | a@a.au
Non-Matches
word | word@ | @word
Author Rating: Not yet rated. Gregory Beamer
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: Many false negatives!
Name: JJ
Date: 7/2/2009 6:02:17 PM
Comment:
Too many things wrong with this one to consider using it. For starters, top-level domains greater than 3 chars, such as .store and .museum, will be failed.


Title: only it doesn't work
Name: pinetree
Date: 6/16/2003 3:59:24 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'User@example.com<br> Yet/Another/Wacky/User@example.com


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