def prep_regex ( patterns ) : flags = 0 if Config . options . case_sensitive else re . I return [ re . compile ( pattern , flags ) for pattern in patterns ]
python regex how to specify a list of patterns
Compile regex patterns .
def prep_regex(patterns):
    """Compile regex patterns."""

    flags = 0 if Config.options.case_sensitive else re.I

    return [re.compile(pattern, flags) for pattern in patterns]