replace non letters and numbers js code example
Example 1: remove non alphanumeric characters javascript
input.replace(/\W/g, '') //doesnt include underscores
input.replace(/[^0-9a-z]/gi, '') //removes underscores too
Example 2: replace non alphanumeric javascript
text.replace(/[\W_]+/g," ");