a more precise re for email addys

rbt rbt at athop1.ath.vt.edu
Wed Jan 18 16:14:25 EST 2006


Jim wrote:
> There is a precise one in a Perl module, I believe.
>   http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
> Can you swipe that?
> 
> Jim
> 

I can swipe it... but it causes my head to explode. I get unbalanced 
paratheses errors when trying to make it work as a python re... it makes 
more sense when broken up like this:

(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]
+(?:(?:(?:\r\n)... \000-\031]
+(?:(?:(?:\r\n)... \000-\031]
+(?:(?:(?:\r\n)... \000-\031]
...
...



More information about the Python-list mailing list