Bug #15070 Updated: ereg() not matching properly.

From: Date: Mon, 11 Feb 2002 22:22:12 +0000
Subject: Bug #15070 Updated: ereg() not matching properly.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-151@lists.php.net to get a copy of this message
ID: 15070 Updated by: derick@php.net Reported By: mking@aspre.net -Status: Open +Status: Bogus Bug Type: Regexps related Operating System: Linux (Cobalt) PHP Version: 4.0.6 New Comment: Bogusify on request Previous Comments: ------------------------------------------------------------------------ [2002-02-11 17:21:16] mking@aspre.net I'm reopening so someone can bogus this bug. (I don't seem to have that option). ------------------------------------------------------------------------ [2002-01-16 12:24:38] mking@aspre.net 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 this bug report at http://bugs.php.net/?id=15070&edit=1

« previous php.bugs (#151) next »