|
|
@ -282,7 +282,7 @@ def match_consecutive(needles, haystack, ignore_case=False):
|
|
|
|
regex_no_sep_end = regex_no_sep + '$'
|
|
|
|
regex_no_sep_end = regex_no_sep + '$'
|
|
|
|
regex_one_sep = regex_no_sep + sep + regex_no_sep
|
|
|
|
regex_one_sep = regex_no_sep + sep + regex_no_sep
|
|
|
|
# can't use compiled regex because of flags
|
|
|
|
# can't use compiled regex because of flags
|
|
|
|
regex_needle = regex_one_sep.join(needles).replace('\\', '\\\\') + regex_no_sep_end
|
|
|
|
regex_needle = regex_one_sep.join(needles).replace('\\', '\\\\') + regex_no_sep_end # noqa
|
|
|
|
regex_flags = re.IGNORECASE | re.UNICODE if ignore_case else re.UNICODE
|
|
|
|
regex_flags = re.IGNORECASE | re.UNICODE if ignore_case else re.UNICODE
|
|
|
|
found = lambda entry: re.search(
|
|
|
|
found = lambda entry: re.search(
|
|
|
|
regex_needle,
|
|
|
|
regex_needle,
|
|
|
|