| 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 |
<ab@cd.ef> | bob A. jones <ab@cd.ef> | bob A. jones <ab@[1.1.1.111]> |
| Non-Matches |
ab@cd.ef | "bob A. jones <ab@cd.ef> | bob A. jones <ab@1.1.1.111> |
| Author |
Rating:
Not yet rated.
David Lott
|
| Source |
http://netusi.com/regexp.htm |
| Your Rating |
|
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'User@example.com<br>
Yet/Another/Wacky/User@example.com