Regular expressions

From: Date: Mon, 16 Oct 2006 19:54:25 +0000
Subject: Regular expressions
Groups: php.general 
Request: Send a blank email to php-general+get-243212@lists.php.net to get a copy of this message
*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? The Regex Coach (which I use extensively) tends to agree Just a thought... Dan PS. That isn't to say that Richards assessment of the regex is incorrect; far from it -- http://chrome.me.uk

« previous php.general (#243212) next »