#46779 [NEW]: Compilation failed in preg_replace for Unicode character properties
| From: | dytrych at webovy-servis dot cz | Date: | Sat, 06 Dec 2008 11:24:51 +0000 |
| Subject: | #46779 [NEW]: Compilation failed in preg_replace for Unicode character properties | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-131671@lists.php.net to get a copy of this message | ||
From: dytrych at webovy-servis dot cz
Operating system: Debian GNU/Linux 2.6.23.17
PHP version: 5.2.7
PHP Bug Type: *General Issues
Bug description: Compilation failed in preg_replace for Unicode character properties
Description:
------------
Unicode character properties doesn't work in preg_replace (since PHP
5.2.7).
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version: 7.8 2008-09-05
Results with phpinfo: http://seo-servis.cz/testpl.php
Reproduce code:
---------------
echo preg_replace("~[^\\pL]+~u", '-', "a 3");
echo preg_replace('~[^\\p{L}]+~u', '-', "a 3");
Expected result:
----------------
a-3
a-3
Actual result:
--------------
Warning: preg_replace() [function.preg-replace]: Compilation failed:
unknown property name after \P or \p at offset 4 in xxx on line 3
Warning: preg_replace() [function.preg-replace]: Compilation failed:
unknown property name after \P or \p at offset 6 in xxx on line 4
--
Edit bug report at http://bugs.php.net/?id=46779&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46779&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46779&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46779&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46779&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46779&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=46779&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46779&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46779&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46779&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46779&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46779&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46779&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46779&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46779&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46779&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46779&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46779&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46779&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46779&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46779&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46779&r=mysqlcfg