import re


def _check_exclude_table(exclude_tables_regexps, table_name):
    """
    Return whether table *table_name* is to be excluded.

    Apply the patterns from *exclude_tables_regexps*.
    If at least one matches, return True.
    """
    for exclude_tables_regexp in exclude_tables_regexps:
        if re.search(exclude_tables_regexp, table_name):
            return True
    return False