def is_base(base_pattern, str):
    """
    base_pattern is a compiled python3 regex.
    str is a string object.
    return True if the string match the base_pattern or False if it is not.
    """
    return base_pattern.match(str, 0, len(str))