note 27354 added to function.preg-replace

From: Date: Tue, 03 Dec 2002 01:35:28 +0000
Subject: note 27354 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-40286@lists.php.net to get a copy of this message
I solved the problem presented by frauen_at_kapierich_dot_net and solved by jared above on numbers preceding a replacement reference by simply producing 9 sets of empty parenteses before the one I wanted to refer to - and since only 99 references are allowed, numbers after the $10 are treated as part of the replacement string and not of the reference: preg_replace("/<!-- ()()()()()()()()()(link|descr|publ)[0-9]+/","<!-- $10".(string)($int+1),$string); -- http://www.php.net/manual/en/function.preg-replace.php http://master.php.net/manage/user-notes.php?action=edit+27354 http://master.php.net/manage/user-notes.php?action=delete+27354 http://master.php.net/manage/user-notes.php?action=reject+27354

« previous php.notes (#40286) next »