Remove all special characters except space from a string using JavaScript -


i want remove special characters except space string using javascript.

for example, abc's test#s should output abcs tests.

you should use string replace function, single regex. assuming special characters, mean that's not letter, here solution:

var str = "abc's test#s"; alert(str.replace(/[^a-za-z ]/g, "")); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -