On Fri, Oct 20, 2006 at 10:03:03PM +0100, Martin Aspeli wrote:
> >The complete regex would look like this:
> > r'|"[^(\|")]*")@[\w-]+(\.[\w-]+)+$')
> That is possibly the ugliest sequence of characters I have ever seen.
Heh. There are lots of regexes floating around that attempt to solve
email. For example
If I were doing it from scratch I'd break it into manageable
chunks and use simpler regexes on the fragments.
Split on '@' for a start. Trying to do something as non-regular
as email addresses with one regular expression just hurts my head
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests