Last active
December 28, 2015 20:31
-
-
Save azakordonets/cf402386078be414c80c to your computer and use it in GitHub Desktop.
Removes spaces and special symbols from string in javascript
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 removeSpecialCharacters(str) { | |
| return str.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/\s]/gi, ""); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment