Title |
Test
Find
Almost RFC2822 Compliant Email Address Check
|
Expression |
^(?:(?#local-part)(?#quoted)"[^\"]*"|(?#non-quoted)[a-z0-9&+_-](?:\.?[a-z0-9&+_-]+)*)@(?:(?#domain)(?#domain-name)[a-z0-9](?:[a-z0-9-]*[a-z0-9])*(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])*)*|(?#ip)(\[)?(?:[01]?\d?\d|2[0-4]\d|25[0-5])(?:\.(?:[01]?\d?\d|2[0-4]\d|25[0-5])){3}(?(1)\]|))$ |
Description |
Validates an RFC 2822 email address, except does not allow most punctuation and non-ascii alphanumeric characters. Also does not take length requirements into account. Allows domain name and IP addresses, but ensures that the IP address entered is valid. |
Matches |
|
Non-Matches |
|
Author |
Rating:
Daniel
|
Source |
|
Your Rating |
|
Title: Pretty useless really
Name: dave
Date: 9/3/2007 11:30:09 PM
Comment:
It matches '&@someplace' and all sorts of other rubbish which I wouldn't regard as a valid in an Internet context.
Title: BOGUS - DO NOT USE
Name: Randal L. Schwartz
Date: 6/16/2006 4:01:37 PM
Comment:
"Validates an RFC 2822 email address, except does not allow most punctuation and non-ascii alphanumeric characters"
Then it's NOT RFC email addresses.
THIS REGEX IS BOGUS. DO NOT USE.
The shortest regex you can use is at http://ex-parrot.com/~pdw/Mail-RFC822-Address.html