|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46800 Warning on ~[^\\pL0-9_]+~u
Submitted: 2008-12-08 19:04 UTC Modified: 2008-12-10 09:40 UTC
From: svoboda at svoon dot net Assigned: nlopess (profile)
Status: Closed Package: PCRE related
PHP Version: 5.2.7 OS: debian etch
Private report: No CVE-ID: None
 [2008-12-08 19:04 UTC] svoboda at svoon dot net
this code:
preg_replace('~[^\\pL0-9_]+~u', '-', $url);

results in:
Warning: preg_replace() [function.preg-replace]: Compilation failed: 
unknown property name after \P or \p at offset 4 in

in 5.2.6 version it works fine



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-08 22:31 UTC]
Please try using this CVS snapshot:
For Windows:

And use this configure line:

# ./configure --disable-all --disable-cgi --with-pcre-regex 
 [2008-12-09 19:48 UTC] svoboda at svoon dot net
I have compiled it with following:
./configure --disable-all --disable-cgi --with-pcre-regex  --with-apxs2=/usr/bin/apxs2 --with-config-file-path=/etc/php5/apache2/php.ini

the problem still remains, but from command line it regexp works fine (from command line it worked even with full configure command).
So the problem is connected with running through apache.

I confirmed this bug on ubuntu hardy.

 [2008-12-09 20:02 UTC] svoboda at svoon dot net
could be it connected?
 [2008-12-09 22:03 UTC]
Please try using this CVS snapshot:
For Windows:

I've commited a fix. can you please check if it works for you?
(please wait ~1h30 counting from this msg to allow a new snapshot to be generated)
 [2008-12-10 07:06 UTC] svoboda at svoon dot net
now it works fine.
could you please send me the fix? I will not use devel version - rather to patch the 5.2.8 stable version.

thank you 
 [2008-12-10 09:40 UTC]
PHP 5.3 & 6 already had the fix for a long time. so I'm closing this bug report.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Sep 25 08:01:25 2023 UTC