php.net |  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
Votes:1
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bryan at phprogrammer dot com
New email:
PHP Version: OS:

 

 [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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

if(ereg("[[:digit:]]", "1234", $regs))
..
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC