ID: 43485 Updated by: [EMAIL PROTECTED] Reported By: cvlug at xs4all dot nl -Status: Open +Status: Bogus Bug Type: PCRE related Operating System: windows xp PHP Version: 5.2.5 New Comment:
The backtrack limit was exhausted. Using preg_last_error(), it'll show 2. (PREG_BACKTRACK_LIMIT_ERROR) See http://br.php.net/manual/en/ref.pcre.php#ini.pcre.backtrack-limit Previous Comments: ------------------------------------------------------------------------ [2007-12-03 14:24:30] cvlug at xs4all dot nl Description: ------------ preg_replace not matching, where it should match n(same for preg_match) Reproduce code: --------------- $regex='/(.*)<[^>]*submenu[^>]*>/mis'; $str is on url: http://www.koopjespakker.nl/test/preg_match_data/str_for_php.txt $modified_string = preg_replace( $regex, 'sss', $str); Expected result: ---------------- a replaced string (other then the input string, $str) Actual result: -------------- "" (preg_replace return nothing) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43485&edit=1