From 02ee625cc7bddde79991cb58f2d2dd1897a88414 Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Wed, 16 Oct 2024 18:11:21 +0200 Subject: [PATCH] Replace `re.match` with `re.fullmatch` See [Benjamin-Loison/cpython/issues/43](https://github.com/Benjamin-Loison/cpython/issues/43). --- website/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/search.py b/website/search.py index 7cd7c55..aefcf83 100755 --- a/website/search.py +++ b/website/search.py @@ -13,7 +13,7 @@ message = ' '.join(pathSearchMessageParts[2:]) pathSearchRegex = re.compile(pathSearch) messageRegex = re.compile(message) -isPathSearchAChannelId = re.match(r'[a-zA-Z0-9-_]{24}', pathSearch) +isPathSearchAChannelId = re.fullmatch(r'[a-zA-Z0-9-_]{24}', pathSearch) searchOnlyCaptions = pathSearchMessageParts[0] == 'search-only-captions'