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? -

sql - text truncated using perl DBI insert -

php - Pass object by reference or value -