ID: 33754 Updated by: [EMAIL PROTECTED] Reported By: bryan at phprogrammer dot com -Status: Open +Status: Bogus Bug Type: POSIX related Operating System: llinux PHP Version: 4.3.11 New Comment:
It should be like this: if(ereg("[[:digit:]]", "1234", $regs)) .. Previous Comments: ------------------------------------------------------------------------ [2005-07-18 19:05:49] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33754&edit=1