|
Posted by Tim Roberts on 09/25/05 07:39
John Dunlop <usenet+2004@john.dunlop.name> wrote:
>
>Mazin07 wrote:
>
>> /\w+@\w+\.\w+
>
>Ad hoc regular expressions to validate the syntax of e-mail addresses
>are invariably both too loose and too strict. Too loose in that they
>pass forms not allowed by RFC2822, too strict in that they reject
>forms allowed by RFC2822. Even the Mail::RFC822::Address pattern
>doesn't encompass the gamut of forms, but then it doesn't pretend to.
Jeffrey Friedl's book, "Mastering Regular Expressions" contains a complete
regular expression which matches all valid RFC 822 e-mail addresses. It is
more than 6,500 characters long.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
[Back to original message]
|