Answers for "how to remove non alphabets and numbers in javascript"

5

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
0

remove everything except alphabet and number js

myString.replace(/[A-Za-z0-9_]/g, '')
Posted by: Guest on August-10-2021

Code answers related to "how to remove non alphabets and numbers in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language