Graeme Cross <[email protected]> writes:
>> I can't recommend a library, but I *can* tell you that email addresses
>> aren't regular, so a regular expression is wrong.
>
> Jeffrey Friedl's book "Mastering Regular Expressions" (O'Reilly) has an
> RFC 822 compliant regular expression in it that is meant to be very
> robust.
I do not believe that is possible. AFAICT, this ABNF snippet from RFC
5322 (p12) is irregular:
ccontent = ctext / quoted-pair / comment
comment = "(" *([FWS] ccontent) [FWS] ")"
I glanced at RFC 822 (which is obsolete); it also has a comment
nonterminal, although it's not so obviously recursive.
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main