From eb1d4a95ee388dcb8dd6149ad79fa516942e2cb8 Mon Sep 17 00:00:00 2001 From: Francois Pelletier Date: Mon, 17 Apr 2023 23:39:56 -0400 Subject: [PATCH] =?UTF-8?q?Correction=20d=C3=A9tection=20de=20mots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index ea950c1..c9665af 100644 --- a/main.py +++ b/main.py @@ -31,7 +31,7 @@ def only_alphanumerics(text): """ Detects if the text contains only alphanumerics. """ - return re.search("[^a-zA-Z0-9]", text) is None + return re.search(r"\W", text) is None def make_bold_part(token):