remove non alphanumeric characters javascript 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," ");