import re


def is_regex(tentative_regex: str):
    """ Returns true if the argument is a valid python regex, and false otherwise. """
    if len(tentative_regex) == 0:
        return False
    try:
        re.compile(tentative_regex)
        return True
    except re.error:
        return False