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

Reply via email to