If I do this: import re a=re.search(r'hello.*?money', 'hello how are you hello funny money')
I would expect a.group(0) to be "hello funny money", since .*? is a non-greedy match. But instead, I get the whole sentence, "hello how are you hello funny money". Is this expected behavior? How can I specify the correct regexp so that I get "hello funny money" ? -- http://mail.python.org/mailman/listinfo/python-list