note 16495 added to function.preg-replace

From: Date: Thu, 01 Nov 2001 23:12:54 +0000
Subject: note 16495 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-20026@lists.php.net to get a copy of this message
In my PHP 4.04pl1, the backreferences added escape slashes! I.e. if the string referred to by a back reference contains an apostraphe ('), it gets escaped. I'm using the e operator, BTW. I had to put a stripslashes() in the replacement code around the backreference [stripslashes("$2")] to make it behave as I expected. -- http://www.php.net/manual/en/function.preg-replace.php http://master.php.net/manage/user-notes.php?action=edit+16495 http://master.php.net/manage/user-notes.php?action=delete+16495 http://master.php.net/manage/user-notes.php?action=reject+16495

« previous php.notes (#20026) next »