Why doesn't this RE match?

Just Another Victim of the Ambient Morality ihatespam at hotmail.com
Sat Feb 7 01:23:32 CET 2009

    I'm confused by this behaviour:

import re

regex = re.compile('foo')
match = regex.match('whatfooever')

    In my experience with regular expressions, regex should have found a 
match.  However, in this case regex.match() returns None.  Why is that? 
What am I missing?
    Thank you...

More information about the Python-list mailing list