Skip to content

Instantly share code, notes, and snippets.

@adamcrampton
Created October 29, 2018 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamcrampton/d52543e1a225bc444d1d013fbd709a07 to your computer and use it in GitHub Desktop.
Save adamcrampton/d52543e1a225bc444d1d013fbd709a07 to your computer and use it in GitHub Desktop.
Strip all non alphanumeric characters from a string
str = str.replace(/[\W_]+/g,'';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment