[Tutor] stopping greedy matches

Mike Hall michael.hall at critterpixstudios.com
Thu Mar 17 20:47:54 CET 2005


On Mar 17, 2005, at 11:11 AM, Kent Johnson wrote:
> The first one matches the space after 'in'. Without it the .+? will 
> match the single space, then \b matches the *start* of the next word.

I think I understand. Basically the first dot advances the pattern 
forward in order to perform a non-greedy match on the following 
word.(?) Very nice.



More information about the Tutor mailing list