javascript remove non alphanumeric

Posted by Paidboom - 5 months ago

remove non alphanumeric characters javascript

doesnt include underscores

input.replace(/\W/g, '') 

removes underscores too

input.replace(/[^0-9a-z]/gi, '') 

replace non alphanumeric javascript

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