Re: REGEX Help Please

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shaun wrote:
Hi,

I am trying to implement a regular expression so that I have a number between 0.00 and 1.00. the following works except I can go up to 1.99

$regexp = "/^[0-1]{1}.[0-9]{2}/";

Can anyone help here please?

Thanks

May have to go outside just a regex...

if ( preg_match ( "/^\d{1}\.\d{2}$/", $number ) && $number >= 0 && $number <= 1 )

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux