|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-02-11 17:21 UTC] mking at aspre dot net
[2002-02-11 17:22 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Jan 02 00:00:02 2026 UTC |
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 }