j.String.ReplaceAll
Wed Sep 22 2021 13:41:59 GMT+0000 (UTC)
Saved by
@rick_m
#javascript
String.prototype.replaceAll = function (find, replace) {
var str = this;
return str.replace(new RegExp(find.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'g'), replace);
};
content_copyCOPY
Comments