Bug #15070 Updated: ereg() not matching properly.
| From: | mking at aspre dot net | Date: | Mon, 11 Feb 2002 22:21:16 +0000 |
| Subject: | Bug #15070 Updated: ereg() not matching properly. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150@lists.php.net to get a copy of this message | ||
ID: 15070
Updated by: mking@aspre.net
Reported By: mking@aspre.net
-Status: Closed
+Status: Open
Bug Type: Regexps related
Operating System: Linux (Cobalt)
PHP Version: 4.0.6
New Comment:
I'm reopening so someone can bogus this bug. (I don't seem to have that
option).
Previous Comments:
------------------------------------------------------------------------
[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