remove with regex javascript code example
Example 1: js remove special characters
var desired = stringToReplace.replace(/[^\w\s]/gi, '')
Example 2: javascript regex replace
const search = 'duck'
const replaceWith = 'goose';
const result = 'duck duck go'.replaceAll(search, replaceWith);
result; // => 'goose goose go'