codingtcher.com
Theme Night
Home
Login

Remove non alphanumeric characters javascript

//remove non alphanumeric characters javascript
input.replace(/\W/g, '') //doesnt include underscores
input.replace(/[^0-9a-z]/gi, '') //removes underscores too

//replace non alphanumeric javascript
text.replace(/[\W_]+/g," ");

Related Code