|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #6680 regexps (ereg*) ignores locale settings
Submitted: 2000-09-12 05:54 UTC Modified: 2010-08-07 01:44 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mbravo at tag-ltd dot spb dot ru Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.0.1pl2 OS: FreeBSD 4.1-RELEASE
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: mbravo at tag-ltd dot spb dot ru
New email:
PHP Version: OS:


 [2000-09-12 05:54 UTC] mbravo at tag-ltd dot spb dot ru
if(eregi("^[[:alnum:]]+$",$t1)) {
} else {
  printf("not alnum<br>");

when invoked with $t1=<some string in cyrillic koi8-r encoding> (example - "????") and correct locale settings (see below) prints "not alnum"

while at the command line grep -E with the same input matches:

mbravo@tag-ltd:pages$ grep -E '[[:alnum:]]+'

PHP configured as - 

'./configure' '--prefix=/opt/www' '--with-apxs=/opt/www/bin/apxs'
'--with-mod_charset' '--with-mysql=/opt' '--with-pgsql=/opt'

Revision                                            $Revision: 1.17 $



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-17 16:30 UTC]
You may want to use PCRE extension - it supports locale settings.
 [2001-08-31 06:32 UTC]
Moved to feature request.
 [2010-08-07 01:44 UTC]
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-08-07 01:44 UTC]
ereg is deprecated in favor of preg
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 20 20:03:37 2021 UTC