From 46663d818544e1d401ad6102e2536fe2e377eba4 Mon Sep 17 00:00:00 2001 From: Miriana <121249605+MirianaPassarotto@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:43:14 +0100 Subject: [PATCH] fix(strings) : solved BUG=036 --- source/BUG/strings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/BUG/strings.py b/source/BUG/strings.py index 5cdfb0f..30650e3 100644 --- a/source/BUG/strings.py +++ b/source/BUG/strings.py @@ -122,7 +122,8 @@ def strip_non_alphanumeric(s: str) -> str: """ BUG036: strip_non_alphanumeric should remove all non-alphanumeric characters, not just leading and trailing ones. """ - result = s.strip() + import re + result = re.sub(r'\W+', '', s) return result