Re: Checking for Valid Charactors.

From: Date: Sun, 08 Jun 2003 09:03:37 +0000
Subject: Re: Checking for Valid Charactors.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-150659@lists.php.net to get a copy of this message
thanks ----- Original Message ----- From: "Jason Wong" <php-general@gremlins.biz> To: <php-general@lists.php.net> Sent: Sunday, June 08, 2003 8:57 PM Subject: Re: [PHP] Checking for Valid Charactors. > On Sunday 08 June 2003 16:22, Philip J. Newman wrote: > > I would liek to check for 0-9 and . charactors i'm using ... > > > > $email = "60.00"; > > > > if eregi("^[0-9.])?$",$email) { > > > > echo"valid"; > > > > } else { > > > > echo"not valid"; > > > > } > > > > Its not working well. umm ... help ... > > eregi("^([0-9.])*$", $string) > > will match: > an empty string > a string containing only 0-9 and periods > > It is better for you to learn the preg_*() functions instead of the ereg*() > ones. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > ------------------------------------------ > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > ------------------------------------------ > /* > This fortune is false. > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#150659) next »