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\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$
Description
Expression 1 of 2 used to check email address syntax.
Matches
bob@somewhere.com | bob.jones@[1.1.1.1] | bob@a.b.c.d.info
Non-Matches
bob@com | bob.jones@some.where | bob@1.1.1.123
Author Rating: Not yet rated. David Lott
Source http://netusi.com/regexp.htm
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: 1
Name: 12
Date: 5/30/2008 1:17:32 PM
Comment:
444


Title: Fails to match valid email address
Name: The Fred and Barney Comedy Team <fred&barney@stonehenge.com>
Date: 1/26/2005 3:19:11 AM
Comment:
Fails to match the valid email address fred&barney@stonehenge.com


Title: hmm
Name: klatte
Date: 3/14/2004 6:57:10 PM
Comment:
a.@abc.com works


Title: only it doesn't work
Name: pinetree
Date: 6/16/2003 3:56:44 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