def probably_regex(maybe_regex):
    if isinstance(maybe_regex, RegexObject):
        return True
    else:
        # Use common characters used in regular expressions as a proxy
        # for if this string is in fact a regex.
        return any((c in maybe_regex for c in ['*','\\',']']))
dataset/ETHPy150Open corydolphin/flask-cors/flask_cors/core.py/probably_regex/original