note 49861 added to reference.pcre.pattern.syntax
| From: | SG_01 | Date: | Thu, 10 Feb 2005 17:24:32 +0000 |
| Subject: | note 49861 added to reference.pcre.pattern.syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-84803@lists.php.net to get a copy of this message | ||
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("/>$Tag<(.*)>\/$Tag</iU",
"<$Tag>\\1</$Tag>", $Data);
}
?>
----
Manual Page -- http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49861
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49861&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49861&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49861&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49861&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49861&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49861&report=yes
Search -- http://master.php.net/manage/user-notes.php