Re: ereg matching email address
| From: | kevin at oceania dot net | Date: | Wed, 06 Sep 2000 17:53:50 +0000 |
| Subject: | Re: ereg matching email address | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15596@lists.php.net to get a copy of this message | ||
Monte Ohrt wrote:
>
> You can port it from perl if you wish :-)
>
> http://public.yahoo.com/~jfriedl/regex/email-opt.pl
>
> kris@grinz.com wrote:
> >
> > Hi,
> >
> > I am having trouble with ereg matching an email address. I am
> > unable to find any examples of this explicitly. Can someone send
> > me the ereg pattern for checking whether an email address is valid
> > or not? I have tried a few ereg patterns with no success.
> >
Perhaps something like
/\b(?i)[a-z0-9]([._-]?[a-z0-9]+)*\@\w([.-]?[a-z0-9]+)*\.[a-z]{2,3}\b/