Edit report at http://bugs.php.net/bug.php?id=53288&edit=1

 ID:                 53288
 Updated by:         cataphr...@php.net
 Reported by:        ysu at ysumail dot com
 Summary:            "Compilation failed" on certain pcre patterns in
                     preg_replace
-Status:             Closed
+Status:             Bogus
 Type:               Bug
 Package:            PCRE related
 Operating System:   win7
 PHP Version:        5.3.3
 Block user comment: N



Previous Comments:
------------------------------------------------------------------------
[2010-11-10 05:00:56] ysu at ysumail dot com

Um, I think I've overlooked that hyphen, my apologies.

------------------------------------------------------------------------
[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

Reply via email to