whoami? iam!
Bjorn Tillenius
bjorn.tillenius at gmail.com
Fri Dec 16 08:12:31 GMT 2005
On Fri, Dec 16, 2005 at 12:59:18AM -0600, Michael Ellerman wrote:
> On Fri, 16 Dec 2005 00:27, Nathaniel McCallum wrote:
> > Thought this plugin (attached) may like to be included.
> >
> > Nathaniel
>
> It might be nice to try and validate the input, to catch typos more than
> anything. I have a script which uses the following regexps to check email
> addresses, although I didn't write it so I can't vouch for it's correctness -
> but it looks ok to me.
>
> email_re = re.compile("[a-zA-Z0-9\.]+\@[a-zA-Z0-9\.]+")
> email_name_re = re.compile("(\w|\s)+\<[a-zA-Z0-9\.]+\@[a-zA-Z0-9\.]+\>")
Well, for example, it won't match:
"Foo.Bar" <foo at bar.com>
But of course, I don't know how you plan to handle special and non-ASCII
characters.
Regards,
Bjorn
More information about the bazaar
mailing list