OT: regex to find email
Josh Close
narshe at gmail.com
Wed Sep 22 14:04:57 EDT 2004
On Wed, 22 Sep 2004 08:59:08 +0200, Fredrik Lundh
<fredrik at pythonware.com> wrote:
> Jorgen Grahn wrote:
>
> > I've seen no references to RFC 2822 in this thread ... please note that what
> > all these regexes catch is unlikely to be exactly the set of all valid RFC
> > 2822 addresses.
>
> the perl faq is also required reading:
>
> http://www.perldoc.com/perl5.6/pod/perlfaq9.html#How-do-I-check-a-valid-mail-address-
>
> Q. How do I check a valid mail address?
>
> A. You can't, at least, not in real time. Bummer, eh?
>
> Without sending mail to the address and seeing whether there's a human
> on the other hand to answer you, you cannot determine whether a mail
> address is valid.
>
> what morally sound reasons are there to scrape mail addresses from text
> documents, btw?
>
Well, I do know that a lot of email hosting companies like hotmail,
yahoo, etc, have certain standards for user names which are probably a
lot more strict than RFC2822. That's what I was going by, but it could
possibly miss a few names/domains with it.
-Josh
More information about the Python-list
mailing list