Edit report at http://bugs.php.net/bug.php?id=53288&edit=1
ID: 53288
User updated by: ysu at ysumail dot com
Reported by: ysu at ysumail dot com
Summary: "Compilation failed" on certain pcre patterns in
preg_replace
-Status: Open
+Status: Closed
Type: Bug
Package: PCRE related
Operating System: win7
PHP Version: 5.3.3
Block user comment: N
New Comment:
Um, I think I've overlooked that hyphen, my apologies.
Previous Comments:
------------------------------------------------------------------------
[2010-11-10 04:53:21] ysu at ysumail dot com
Description:
------------
Trying the code, it'll give you this warning:
Warning: preg_replace() [function.preg-replace]: Compilation failed:
range out of order in character class at offset 6 in
D:\www\integraCMS\scripts\testOffset.php on line 4
However, if you shuffle the characters around it'll not happen.
Test script:
---------------
<?php
$value = "this @ is . a _ test-string";
$value = preg_replace('#[^\w...@]#','',$value);
echo $value;
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53288&edit=1