From 7d82acb488e2c0544dc12251d793ea6c6e3f80c3 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Tue, 25 Apr 2023 14:14:01 +0800 Subject: [PATCH] Fix bug when in/excludes contains wildcards rules --- game_backuper/regexp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game_backuper/regexp.py b/game_backuper/regexp.py index 85a5c32..055ff00 100644 --- a/game_backuper/regexp.py +++ b/game_backuper/regexp.py @@ -48,4 +48,4 @@ def wildcards_to_regex(s: str, **k): s = s.replace(i, f"\\{i}") s = s.replace("*", ".*") s = s.replace("?", ".") - return Regex(s, **k) + return Regex(f"^{s}$", **k)