File talk:Email-regex.svg
Jump to navigation
Jump to search
incorrect regular expression
[edit]The regular expression might give the impression that it is a valid regexp to validate email addresses. This is incorrect as email addresses such as "foo bar"@example.org are legal. See RFC 2821/2822. -- 3247 (talk) 08:56, 2 October 2006 (UTC)
- Yes, this regex is totally nonsensical. It misses perfectly valid addresses and accepts incorrect ones. A slightly better working regex can be found at http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html (it’s still not perfect, though, because it misses comment handling). Sam Hocevar 13:42, 8 February 2007 (UTC)