Last active
July 13, 2023 07:18
-
-
Save protzi/39fc8c5c9b5ad58fa3b2 to your computer and use it in GitHub Desktop.
Remove all non-alphanumeric characters (punctuation, spaces and symbols)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function removeNonNumerical(str) { | |
| return str.replace(/[\W_]/gi, '').toLowerCase(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment