On Mon, Feb 25, 2008 at 05:04:57PM -0500, Derek Belrose wrote:
> I don't think you need the '?',
> 
> .* means match any number of any characters.  The question mark means  
> match exactly 0-1 instances.

Question mark has a different meaning when it follows another quantifier.

.* matches any number of characters, greedily - it matches as /many/
characters as it can.

.*? matches any number of characters, non-greedily - it matches as /few/
characters as it can.

For example, given the line "dog" "cat" "fish", ".*" would match
"dog" "cat" "fish" while ".*?" would match "dog" (then "cat", then
"fish").

Ronald

-- 
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to