Skip to content

Commit

Permalink
fix(strings) : solved BUG=036
Browse files Browse the repository at this point in the history
  • Loading branch information
MirianaPassarotto committed Dec 13, 2023
1 parent 7fcacee commit 46663d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/BUG/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 46663d8

Please sign in to comment.