input.replace(/W/g, '') //doesnt include underscores input.replace(/[^0-9a-z]/gi, '') //removes underscores too
str.toLowerCase().replace(/s+|W/g, '')