diff --git a/bin/autojump_match.py b/bin/autojump_match.py index 8747b90..4fe3814 100644 --- a/bin/autojump_match.py +++ b/bin/autojump_match.py @@ -75,7 +75,7 @@ def match_consecutive(needles, haystack, ignore_case=False): (path='/foo/baz', weight=10), ] """ - regex_no_sep = '[^' + os.sep + ']*' + regex_no_sep = '[^\\' + os.sep + ']*' regex_no_sep_end = regex_no_sep + '$' regex_one_sep = regex_no_sep + os.sep + regex_no_sep regex_needle = regex_one_sep.join(imap(re.escape, needles)) + regex_no_sep_end