note 27354 deleted from function.preg-replace by sniper

From: Date: Sun, 07 Sep 2003 22:04:17 +0000
Subject: note 27354 deleted from function.preg-replace by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55694@lists.php.net to get a copy of this message
Note Submitter: jeppe@nospam.bundsgaard.net ---- 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);

« previous php.notes (#55694) next »