My dilemma: I\'m passing my function a string that I need to then perform numerous regex manipulations on. The logic is if there\'s a match in the first regex, do one thing
Here your regexs and matches are not repeated twice:
match = re.match('regex1', string) if match: # do stuff return match = re.match('regex2', string) if match: # do stuff return