Skip to content

Instantly share code, notes, and snippets.

@tomraithel
Created November 16, 2012 08:22
Show Gist options
  • Save tomraithel/4085424 to your computer and use it in GitHub Desktop.
Save tomraithel/4085424 to your computer and use it in GitHub Desktop.
JS: regex replace all whitespaces with dash
"asdf a asdfsad".replace(/\s+/g, "-");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment