|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33754 The ereg function does not accept [:alpha:] as representing [a-zA-Z]
Submitted: 2005-07-18 19:05 UTC Modified: 2005-07-18 21:15 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: bryan at phprogrammer dot com Assigned:
Status: Not a bug Package: Regexps related
PHP Version: 4.3.11 OS: llinux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: bryan at phprogrammer dot com
New email:
PHP Version: OS:


 [2005-07-18 19:05 UTC] bryan at phprogrammer dot com
It also ignores all the rest of the metacharacters [:space:] [:alnum:] [:digit:] and so on

Reproduce code:
  if(ereg("[:digit:]", "1234", $regs))
    print "true";
    print "false";

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-18 21:15 UTC]
It should be like this:

if(ereg("[[:digit:]]", "1234", $regs))
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 13:01:28 2024 UTC