On Mar 16, 2005, at 8:32 PM, Kent Johnson wrote:
"in (.*?)\b" will match against "in " because you use .* which will match an empty string. Try "in (.+?)\b" (or "(?<=\bin)..+?\b" )to require one character after the space.Another working example, excellent. I'm not too clear on why the back to back ".." in "(?<=\bin)..+?\b" )" makes the regex work, but it does.
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.
Kent
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor