Skip to content

Instantly share code, notes, and snippets.

@gthrm
Created October 29, 2019 21:24
Show Gist options
  • Save gthrm/e38d0d1efa7850f1856d992ebc164f26 to your computer and use it in GitHub Desktop.
Save gthrm/e38d0d1efa7850f1856d992ebc164f26 to your computer and use it in GitHub Desktop.
const str = 'some string'
str.replace(/[ .,\/#!$%\^&\*;:{}=\-_`~()]/g, '_'); //удалит все знаки и пробел
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment