ID: 46779 Updated by: [EMAIL PROTECTED] Reported By: dytrych at webovy-servis dot cz Status: Bogus Bug Type: PCRE related Operating System: Debian GNU/Linux 2.6.23.17 PHP Version: 5.2.7 New Comment:
btw, this might be related with http://bugs.php.net/46800 Previous Comments: ------------------------------------------------------------------------ [2008-12-08 22:04:32] [EMAIL PROTECTED] I can't reproduce this problem. My guess is that you are linking against your system's PCRE library (which can be confirmed by checking if pcre appears in output of "ldd `which php`") instead of using the bundled version. If that is the case, then your library was compiled without unicode support. ------------------------------------------------------------------------ [2008-12-06 11:24:51] dytrych at webovy-servis dot cz 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 this bug report at http://bugs.php.net/?id=46779&edit=1