|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-07-18 19:05 UTC] bryan at phprogrammer dot com
Description:
------------
It also ignores all the rest of the metacharacters [:space:] [:alnum:] [:digit:] and so on
Reproduce code:
---------------
<?
if(ereg("[:digit:]", "1234", $regs))
{
print "true";
}
else
{
print "false";
}
?>
Expected result:
----------------
true
Actual result:
--------------
false
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 01:00:02 2025 UTC |
It should be like this: if(ereg("[[:digit:]]", "1234", $regs)) ..