Revert "improve efficiency of _glob_to_re"
This reverts commit edac710bc0
.
This commit is contained in:
parent
7865bc1dfb
commit
6157f02067
|
@ -230,8 +230,7 @@ def _glob_to_re(glob: str, word_boundary: bool) -> Pattern:
|
|||
if IS_GLOB.search(glob):
|
||||
r = re.escape(glob)
|
||||
|
||||
# replace 1 or more repeats of `\*` with `.*?`
|
||||
r = re.sub(r"(\\\*)+", ".*?", r)
|
||||
r = r.replace(r"\*", ".*?")
|
||||
r = r.replace(r"\?", ".")
|
||||
|
||||
# handle [abc], [a-z] and [!a-z] style ranges.
|
||||
|
|
Loading…
Reference in a new issue