예제 #1
0
def is_glob_exp(line):
    """
    Determines whether the string is a gitignore glob expression.

    :param line:
        Given string.
    :return:
        True if the string is a glob expression. False otherwise.
    """
    results = unescaped_search_for('[*!?\[\]]', line, use_regex=True)
    return sum(1 for x in results) != 0
예제 #2
0
def is_glob_exp(line):
    """
    Determines whether the string is a gitignore glob expression.

    :param line:
        Given string.
    :return:
        True if the string is a glob expression. False otherwise.
    """
    results = unescaped_search_for('[*!?\[\]]', line, use_regex=True)
    return sum(1 for x in results) != 0