From: [EMAIL PROTECTED] Operating system: Linux (Cobalt) PHP version: 4.0.6 PHP Bug Type: Regexps related Bug description: ereg() not matching properly.
I'm having weird problems with ereg(). Look at the following code. There is no reason that ereg() should return false with the value ("1.99"). It does. It returns true with "1.90". This pattern should return true for (in english): 0 or more of anything, one "." exactly, two digits exactly, 0 or more of anything I think there may be a problem with the regex libraries. This worked in 4.05, but now does not work with 4.06 $vTmp = "$1.99"; // "$1.90" works!!! settype($vTmp, "double"); if(ereg(".*\.[0-9][0-9].*",$vTmp)) { // handle error }else{ // continue } -- Edit bug report at: http://bugs.php.net/?id=15070&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]