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\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))>$
Description
Expression 2 or 2 for matching email address syntax. This one matches the <angle bracket syntax>.
Matches
<[email protected]> | bob A. jones <[email protected]> | bob A. jones <ab@[1.1.1.111]>
Non-Matches
[email protected] | "bob A. jones <[email protected]> | bob A. jones <[email protected]>
Author Rating: The rating for this expression. 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: Fails to match valid email addresses
Name: Randal L. Schwartz
Date: 2/16/2005 9:39:51 AM
Comment:
Fails to match valid RFC822.


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