Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove all the punctuations in javascript

If you want to remove specific punctuation from a string, it will probably be best to explicitly remove exactly what you want like

replace(/[.,/#!$%^&*;:{}=-_`~()]/g,"")
Doing the above still doesn't return the string as you have specified it. If you want to remove any extra spaces that were left over from removing crazy punctuation, then you are going to want to do something like

replace(/s{2,}/g," ");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #punctuations #javascript
ADD COMMENT
Topic
Name
9+5 =