AlanTsai
11/25/2015 - 10:19 PM

From http://stackoverflow.com/questions/1144783/replacing-all-occurrences-of-a-string-in-javascript #javascript

var find = 'abc';
var re = new RegExp(find, 'g');

str = str.replace(re, '');