How do I use replace regex in JavaScript to get rid of everything that's not a letter, number or space in a sentence?
var string = "here is a sentence with letters and numbers and symbols 123!@#";
How do I use replace regex in JavaScript to get rid of everything that's not a letter, number or space in a sentence?
var string = "here is a sentence with letters and numbers and symbols 123!@#";
var string = "here is a sentence with letters and numbers and symbols 123!@#";
var x = string.replace(/[^a-zA-Z0-9 ]/g,'')
console.log(x)