如何移除所有不是字母或“数字”的字符?
我有一个字符串:
var string = 'This - is my 4 String, and i - want remove all characters 49494 that are not letters or "numbers"';
And i want transform into this:
var string = 'This is my 4 String and i want remove all characters 49494 that are not letters or numbers'
这是可能的吗?谢谢!
string.replace(/[^\w\s]/g, '')
- Scott Sauyet