remove special characters and spaces javascript code example
Example: remove special characters from string javascript
var str = "Hello^# World/";
str.replace(/[^a-zA-Z ]/g, ""); // "Hello World"
var str = "Hello^# World/";
str.replace(/[^a-zA-Z ]/g, ""); // "Hello World"