1 | var replaceall = function (replaceThis, withThis, inThis) {
|
2 | withThis = withThis.replace(/\$/g,"$$$$");
|
3 | return inThis.replace(new RegExp(replaceThis.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|<>\-\&])/g,"\\$&"),"g"), withThis);
|
4 | };
|
5 |
|
6 | if (typeof (exports) !== "undefined") {
|
7 | if (typeof (module) !== "undefined" && module.exports) {
|
8 | exports = module.exports = replaceall;
|
9 | }
|
10 | exports.replaceall = replaceall;
|
11 | } |
\ | No newline at end of file |