def re_has_disallowed_patterns(regex_str):
    # Rule
    # checks if string does not have disallowed patterns
    for wrong_pattern in DISALLOWED_PATTERNS:
        try:
            if re.search(wrong_pattern, regex_str):
                return True
        except:
            pass
    for char in DISALLOWED_CHARS:
        if char in regex_str:
            return True
    return False
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/libraries/adlibre/re_gen/re_validate.py/re_has_disallowed_patterns/original