#43485 [Opn->Bgs]: preg_replace not matching

From: Date: Mon, 03 Dec 2007 15:50:05 +0000
Subject: #43485 [Opn->Bgs]: preg_replace not matching
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120326@lists.php.net to get a copy of this message
ID: 43485 Updated by: felipe@php.net 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

« previous php.bugs (#120326) next »