Some more odd behaviour from the Regexp library

David Veerasingam vdavidster at gmail.com
Thu Oct 20 12:01:50 EDT 2005


Thanks for all your replies.

I guess I've always used .*? as sort of an idiom for a non-greedy
match, but I guess it only works if I specify the end point (which I
didn't in the above case).

e.g. re.search(r'exit: (.*?)$', a)

Thanks for pointing that out! 

David




More information about the Python-list mailing list