The match() function only checks if the RE matches at the beginning of the string, while search() will scan forward through the string for a match. It's important to keep this distinction in mind. Remember, match() will only report a successful match which will start at 0; if the match wouldn't start at zero, match() will not report it.
>>> print re.match('super', 'superstition').span() (0, 5) >>> print re.match('super', 'insuperable') None
>>> print re.search('super', 'superstition').span() (0, 5) >>> print re.search('super', 'insuperable').span() (2, 7)
Adding .* defeats this optimization, and requires scanning to the end of the string and then backtracking to find a match for the rest of the RE. Use re.search() instead.