Hmmm, never trust a programmer to test his own code. The regex would probably work if it was anchored to the beginning and end of the line. It's happy as long as there is a legal number in there somewhere...
$var = "Hello Heyley ,9999.330000000000000000000000000001xxxx";
if (ereg('[0-9]{0,2}(,[0-9]{3})(.[0-9]{2})?|[0-9](.[0-9]{2})?',$var) ) {
echo "--->$var<--- passed ";
}
Prints out:
--->Hello Heyley ,9999.330000000000000000000000000001xxxx<--- passed