OT: regex to find email

Peter Hansen peter at engcorp.com
Tue Sep 21 11:23:30 EDT 2004


Josh Close wrote:
> I've been trying to find a good regex to parse emails, but haven't
> found any to my liking. I basically need to have
> 
> ( r'[a-z0-9\.\-\_]@[a-z0-9\.\-\_]', re.IGNORECASE )
> 
> but the first part can't start with .-_ and the last part has to have
> a . in it (first/last being before/after the @).

Ignore my response (which I cancelled so some folks won't see it
anyway).  'Twas bad advice; I didn't read the post. :-(

-Peter



More information about the Python-list mailing list