Created
October 29, 2018 02:13
-
-
Save adamcrampton/d52543e1a225bc444d1d013fbd709a07 to your computer and use it in GitHub Desktop.
Strip all non alphanumeric characters from a string
This file contains 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
str = str.replace(/[\W_]+/g,''; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment