note 49861 deleted from reference.pcre.pattern.syntax by colder

From: Date: Mon, 18 Jun 2007 17:58:06 +0000
Subject: note 49861 deleted from reference.pcre.pattern.syntax by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-127557@lists.php.net to get a copy of this message
Note Submitter: SG_01[-at-]sg01[-dot-]net ---- Re: info at atjeff dot co dot nz It's very simple actually, the question mark acts as a quantity minimizer. Which means it won't take up as much space as it can for one "tag". The same can be achieved by putting a U after the ending slash. Like this: <?PHP function Simple_Tag_Decode($Data, $Tag) { return preg_replace("/&gt;$Tag&lt;(.*)&gt;\/$Tag&lt;/iU", "<$Tag>\\1</$Tag>", $Data); } ?>

« previous php.notes (#127557) next »