xxxxxxxxxx
var find = 'abc';
var re = new RegExp(find, 'g');
str = str.replace(re, '');
xxxxxxxxxx
let str = "Hello. My name is John."
let newStr = str.replaceAll('.', '')
console.log(newStr) // result -> Hello My name is John
let nextStr = str.replaceAll('.', '&')
console.log(nextStr) // result -> Hello& My name is John&