note 70759 deleted from reference.pcre.pattern.modifiers by didou
| From: | didou@php.net | Date: | Fri, 02 Feb 2007 20:43:08 +0000 |
| Subject: | note 70759 deleted from reference.pcre.pattern.modifiers by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-122583@lists.php.net to get a copy of this message | ||
Note Submitter: squeegee
----
If ungreedy doesn't appear to always be working for you (say you're looking for the last
double-quoted phrase in a string, and once in a while the string might have more than one such
phrase, maybe you need to be searching from right to left instead. In that case, just use strrev on
the pattern and string before sending it through preg_* then strrev the matches you get.