|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47480 preg_replace with "/i" is not case insensitive
Submitted: 2009-02-23 13:32 UTC Modified: 2009-03-12 18:46 UTC
Avg. Score:3.5 ± 1.7
Reproduced:3 of 4 (75.0%)
Same Version:2 (66.7%)
Same OS:3 (100.0%)
From: sehh at ionos dot gr Assigned:
Status: Not a bug Package: PCRE related
PHP Version: 5.2.8 OS: Linux
Private report: No CVE-ID:
 [2009-02-23 13:32 UTC] sehh at ionos dot gr


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-09 11:59 UTC] mmcnickle at gmail dot com

 [2009-03-09 12:16 UTC] sehh at ionos dot gr

 [2009-03-09 14:31 UTC] mmcnickle at gmail dot com

 [2009-03-09 14:54 UTC] sehh at ionos dot gr

 [2009-03-09 15:00 UTC] sehh at ionos dot gr

 [2009-03-09 15:25 UTC] mmcnickle at gmail dot com

 [2009-03-09 16:01 UTC] sehh at ionos dot gr

 [2009-03-09 17:20 UTC] mmcnickle at gmail dot com
It wouldn't be impossible, no. But to someone without detailed knowledge of Greek it would be. The article on regular expressions [1] has this to say:

"All of the above deals with a default specification for a regular expression. However, a regular expression engine also may want to support tailored specifications, typically tailored for a particular language or locale. This may be important when the regular expression engine is being used by end-users instead of programmers, such as in a word-processor allowing some level of regular expressions in searching."

Earlier in the document it says about how basic regex engines are only required to include the basic unicode uppercase/lowercase matching.

Looking though the source code of the PRCE library, it does seem possible to generate locale-specific character tables; this may be an avenue to look into.

Perhaps the best thing to do would be to drop a message in the internationalization mailing list ( and see what they have to say.

 [2009-03-12 09:39 UTC] sehh at ionos dot gr
Do you think it would be better if I contacted the developers of the PCRE library at ?

Maybe submitting a patch or bug report to them would cover a lot more open source projects, instead of patching the PCRE library used by php only.
 [2009-03-12 18:46 UTC]
not an issue in php. check the unicode standard.
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Tue Aug 29 15:01:52 2017 UTC