Re: ereg matching email address

From: Date: Wed, 06 Sep 2000 20:59:08 +0000
Subject: Re: ereg matching email address
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-15598@lists.php.net to get a copy of this message
That might cover the vast majority of them, but to cover all possible valid syntaxes it takes an expression about the length of an 8 1/2 x 11 page in normal size font. kevin@oceania.net wrote: > > 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/ -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/

« previous php.general (#15598) next »