diff --git a/anki/tags.py b/anki/tags.py index 79803a32b..c782120ec 100644 --- a/anki/tags.py +++ b/anki/tags.py @@ -143,7 +143,7 @@ class TagManager: "Delete tags if they exist." def wildcard(pat, str): pat = re.escape(pat).replace('\\*', '.*') - return re.search(pat, str, re.IGNORECASE) + return re.match("^"+pat+"$", str, re.IGNORECASE) currentTags = self.split(tags) for tag in self.split(deltags): # find tags, ignoring case