note 91230 added to regexp.reference
| From: | tassergyati at osu1 dot php dot net | Date: | Sun, 31 May 2009 20:08:16 +0000 |
| Subject: | note 91230 added to regexp.reference | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156203@lists.php.net to get a copy of this message | ||
However, if a quantifier is followed by a question mark, then it ceases to be greedy, and instead
matches the minimum number of times possible, so the pattern /\*.*?\*/ does the right thing with
the C comments. The meaning of the various quantifiers is not otherwise changed, just the preferred
number of matches.
The above description never worked for me in php. The only way to match patterns in a non-greedy
manner is to use /U switch.
----
Server IP: 59.162.86.8
Probable Submitter: 122.167.75.1
----
Manual Page -- http://www.php.net/manual/en/regexp.reference.php
Edit -- https://master.php.net/note/edit/91230
Del: integrated -- https://master.php.net/note/delete/91230/integrated
Del: useless -- https://master.php.net/note/delete/91230/useless
Del: bad code -- https://master.php.net/note/delete/91230/bad+code
Del: spam -- https://master.php.net/note/delete/91230/spam
Del: non-english -- https://master.php.net/note/delete/91230/non-english
Del: in docs -- https://master.php.net/note/delete/91230/in+docs
Del: other reasons-- https://master.php.net/note/delete/91230
Reject -- https://master.php.net/note/reject/91230
Search -- https://master.php.net/manage/user-notes.php