Use replace
string.replace(/[^A-Z\d\s]/gi, '')
Note the two flags at the end of the regex
g
- stands for global, and means that every such instance of the regular expression will be found
i
- stands for case insensitive. That means it will match both lower case and uppercase characters
Playing with your string, it returns this output
"Players got to play justsaying"
To transform two or more whitespace characters into a single whitespace, you could hain another replace
method to the existing ones.
string.replace(/[^A-Z\d\s]/gi, '').replace(/\s+/g, ' ')
The key here is the +
character, which finds one or more.
It's probably possible to do it more efficiently, but I'm an amateur in Regex.