1let string = 'soandso, my name is soandso';
2
3let replaced = string.replace(/soandso/gi, 'Dylan');
4
5console.log(replaced); //Dylan, my name is Dylan
1var frase = "Son tres mil trescientos treinta y tres con nueve";
2frase = frase.replace("tres","dos");
3console.log(frase);
4//Son dos mil trescientos treinta y tres con nueve
1replace(regexp, newSubstr)
2replace(regexp, replacerFunction)
3
4replace(substr, newSubstr)
5replace(substr, replacerFunction)