On Thu, May 31, 2007 at 01:26:27PM -0700, Martin Fick
wrote:
> --- "Patrick R. Michaud" <pmichaud pobox.com> wrote:
> > > Also, you probably don't want multiple s in
your
> > > expression, so maybe:
> > >
> > > '/^[^ ]+ [^ ]+.[^ ]+$/'
> >
> > Actually, you really don't want whitespace in the
> > expression either, so:
> >
> > '/^[^ \s]+ [^ \s]+\.[^ \s]+$/'
> >
> > Still better is to be explicit about what is
> > allowed, as opposed to what is forbidden:
> >
> > '/^[-+.\w]+ [-+\w]+\.[-+.\w]+$/'
>
> Sure, as long as you are 100% positive about what is
> permitted (...which I assume you are.)
I'm not 100% positive, but I'm certain that the above
would work for the vast majority of email addresses
that are out there, while still rejecting any that contain
whitespace, lack an ' ', or lack a dot in the domain name.
Pm
_______________________________________________
pmwiki-devel mailing list
pmwiki-devel pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
|