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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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: Sat Dec 21 16:01:28 2024 UTC