for regex in regexes: # If a match, stop looping and move on if regex.match(line): matched = 1 break