import re reg = "He captured a catfish for his cat." p = re.compile(r".*cat") m = p.match(reg) if m: print 'Match found: ', m.start() else: print 'No match'