email format in python

dimitri pater dimitri.pater at gmail.com
Wed Jul 20 10:25:00 CEST 2005


hello,
this one works quite well on validating email syntax:
http://www.secureprogramming.com/?action=view&feature=recipes&recipeid=1

regards,
Dimitri

On 7/20/05, Dark Cowherd <darkcowherd at gmail.com> wrote:
> 
> This seems to give reasonable results.
> import re
> pattern = r'\b[A-Za-z0-9._%-]+@[A-Za-z0-9._%-]+\.[A-Za-z]{2,4}\b'
> pattobj = re.compile(pattern)
> ps = pattobj.search
> if ps(stringtocheck):
> 
> 
> But as lots of people have already told you on this list. This should
> only be used to give a warning and not prevent the use of that
> particular address.
> 
> DarkCowherd
> --
> http://mail.python.org/mailman/listinfo/python-list
> 



-- 
Please visit dimitri's website: www.serpia.com <http://www.serpia.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050720/7c1b072d/attachment.html>


More information about the Python-list mailing list