Remove all non alphabets or special characters except space from a string using javascript

by Nithya 2012-05-18 16:37:18

This can be achieved by using simple regex.

var myval = "sk's lesson#s";
alert(myval.replace(/[^a-zA-Z ]/g, ""));

Tagged in:

865
like
0
dislike
0
mail
flag

You must LOGIN to add comments