how to check if a string is a valid email address (RFC822)?

John W. Baxter jwbnews at
Thu May 25 01:22:39 CEST 2000

In article <8ghlok$2oe$1 at>, Otis Gospodnetic 
<otis at> wrote:

> Hello,
> I need to parse some text and find all (RFC822 valid) email addresses
> in it.
> Is there a module that can take a string and tell me if the string is a
> valid email address or not?
> I am looking for something like Email::Valid or Email::Find modules for
> Perl.

Well, you could start with the regular expression presented in Appendix 
B of "Mastering Regular Expressions" by Jeffrey E.F. Friedl (a "must 
have" IMHO).

But you likely want something more "drop-in-ready".  (In small print, 
this thing fits on one page of the appendix (barely).)


John W. Baxter   Port Ludlow, WA USA  jwbnews at

More information about the Python-list mailing list