Javascript String replaceAll(replaceThis, withThis)
String.prototype.replaceAll = function (replaceThis, withThis) { var re = new RegExp(replaceThis,"g"); return this.replace(re, withThis); };