ID: 45479 Updated by: [EMAIL PROTECTED] Reported By: michael dot virnstein at brodos dot de -Status: Open +Status: Closed Bug Type: PCRE related Operating System: Linux PHP Version: 5.2.6 New Comment:
Bug was in PCRE (http://bugs.exim.org/show_bug.cgi?id=732) and not in PHP. Anyway the fix will be bundled with the next PCRE release. Previous Comments: ------------------------------------------------------------------------ [2008-07-10 16:53:13] michael dot virnstein at brodos dot de Description: ------------ When i use preg_replace with the /u utf-8 modifier and an ungreedy search e.g. with *?, the result is different to a call without /u. Reproduce code: --------------- <?php echo "without /u:". preg_replace('/^[^d]*?(d)?$/', '\\1', 'abc'); echo "<br>"; echo "with /u: ".preg_replace('/^[^d]*?(d)?$/u', '\\1', 'abc'); ?> Expected result: ---------------- without /u: with /u: Actual result: -------------- without /u: with /u: abc ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45479&edit=1
