def re_match(strings_to_match, my_file):
    expression = re.compile('(' + '|'.join(re.escape(item) for item in
        strings_to_match) + ')')
for line in my_file:
    if not expression.search(line):
        return False
return True
Check if a string contains at least one of the strings in a list