Answers for "javascript remove all non alphanumeric characters except spaces"

9

remove non alphanumeric characters javascript

input.replace(/\W/g, '') //doesnt include underscores


input.replace(/[^0-9a-z]/gi, '') //removes underscores too
Posted by: Guest on June-01-2020
2

regex remove all non alphanumeric except spaces

/[^[:alnum:]\x20/gi
Posted by: Guest on November-21-2020

Code answers related to "javascript remove all non alphanumeric characters except spaces"

Code answers related to "Javascript"

Browse Popular Code Answers by Language