Converts, as far as possible, Go filepath.Match patterns into Python regular expression patterns. Blank lines are
    ignored.

    This is a generator of two-element-tuples, with the first item as the compiled regular expression. Items prefixed
    with an exclamation mark are considered negative exclusions, i.e. exemptions. These have the second tuple item set
    to ``True``, others to ``False``.

    :param input_items: Input patterns to convert.
    :return: Generator of converted patterns.
    :rtype: collections.Iterable[(__RegEx, bool)]

def preprocess_matches(input_items):
    """
    Converts, as far as possible, Go filepath.Match patterns into Python regular expression patterns. Blank lines are
    ignored.

    This is a generator of two-element-tuples, with the first item as the compiled regular expression. Items prefixed
    with an exclamation mark are considered negative exclusions, i.e. exemptions. These have the second tuple item set
    to ``True``, others to ``False``.

    :param input_items: Input patterns to convert.
    :return: Generator of converted patterns.
    :rtype: collections.Iterable[(__RegEx, bool)]
    """
    for i in input_items:
        s = i.strip()
        if not s:
            continue
        if s[0] == '!':
            is_negative = True
            match_str = s[1:]
            if not match_str:
                continue
        else:
            is_negative = False
            match_str = s
        yield re.compile(fnmatch.translate(LITERAL_PATTERN.sub(r'[\g<1>]', match_str))), is_negative