{"ScriptPreparationCode":"function escapeRegExp(string) {\r\n return string.replace(/[.*\u002B\\-?^${}()|[\\]\\\\]/g, \u0027\\\\$\u0026\u0027); // $\u0026 means the whole matched string\r\n}\r\nfunction replaceAll(str, find, replace) {\r\n return str.replace(new RegExp(escapeRegExp(find), \u0027g\u0027), replace);\r\n}\r\n\r\nstr = \u0022Test abc test test abc test...Test abc test test abc test...Test abc test test abc test...Test abc test test abc test...Test abc test test abc test...\u0022","TestCases":[{"Name":"split and join","Code":"str.split(\u0022abc\u0022).join(\u0022def\u0022)","IsDeferred":false},{"Name":"regex replace","Code":"replaceAll(str, \u0027abc\u0027, \u0027def\u0027)","IsDeferred":false}]}