import re


def tweet_matches_patterns(tweet, patterns):
    """Checks if a tweet matches a pattern
    :param tweet: tweet to search for the given pattern
    :param patterns: patterns to check against
    """

    for pattern in patterns:
        # this could probably be optimized to use compiled patterns but that's not the bottleneck here
        if re.search(pattern, tweet, re.IGNORECASE) is not None:
            return True

    return False