Re: Regular expressions
| From: | Curt Zirzow | Date: | Mon, 16 Oct 2006 20:10:30 +0000 |
| Subject: | Re: Regular expressions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243217@lists.php.net to get a copy of this message | ||
On 10/16/06, Chrome <admin@chrome.me.uk> wrote:
*edit* sorry I didn't think and just hit reply on this instead of reply all... sorry Richard */edit* [snip] .*? is kinda silly -- .* mean "0 or more characters", and ? means "maybe" but putting them together has no added value, so lose the ? [/snip] I could be wrong (and under the considerable knowledge of Richard I certainly feel it :) ) but doesn't the ? after a quantifier signify that preceding pattern is to be taken as ungreedy?Yes, this is correct. ? after * means means ungreedy in this paticular match. Curt.