Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove special characters from string javascript

var desired = stringToReplace.replace(/[^ws]/gi, '')

//if you are using non english like arabic and other language
var outString = sourceString.replace(/[`~!@#$%^&*()_|+-=?;:'",.<>{}[]/]/gi, '');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #special #characters #string #javascript
ADD COMMENT
Topic
Name
1+2 =