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# - SharpSVN - How to get the previous revision? -

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

url - Querystring manipulation of email Address in PHP -