Posted by Rich on 05/08/06 21:55
On 8 May 2006 00:52:47 -0700, jenngra@gmail.com wrote...
>
>I need an expression which will only pass/clear currency data, 0.00
>thru 9999999.00. How would that be parsed? Thanks so much!
>
The preg_match() function is pretty useful for these..
if (preg_match("/^[0-9]+\.[0-9][0-9]$/", $data))
{
echo "A match was found.";
}
else
{
echo "A match was not found.";
}
Rich
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Navigation:
[Reply to this message]
|