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.
That's right. The first dot could just as well be a space or \s or maybe even \s+ (to match any amount of white space). I actually used the dot because I thought it would be clearer than a space :-)
Kent
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor