{"ScriptPreparationCode":"var sep = \u0022[\\x20\\t\\r\\n\\f]\u0022;\r\nvar not_sep = \u0022[^\\x20\\t\\r\\n\\f]\u0022;\r\n\r\nvar str = \u0027Abcd efghij klmnopqrstuv wxy Abcd efghij klmnopqrstuv wxy Abcd efghij klmnopqrstuv wxyAbcd efghij klmnopqrstuv wxy Abcd efghij klmnopqrstuv wxy Abcd efghij klmnopqrstuv wxy\u0027;","TestCases":[{"Name":"Regex","Code":"var name = \u0022skin-oasis|background-dynamic\u0022;\r\n\r\nlet re = new RegExp(name \u002B \u0022(?:\u0022 \u002B sep \u002B \u0022\u002B|$)\u0022);\r\nvar res = str.replace(re, \u0022\u0022);\r\n","IsDeferred":false},{"Name":"Regex match as Split - jQuery style :-)","Code":"let re = new RegExp(not_sep \u002B \u0022\u002B\u0022, \u0027g\u0027);\r\n\r\nlet arr = str.match(re);\r\nfor (i = 0; i \u003C arr.length; \u002B\u002Bi)\r\n{\r\n if ( arr[i] == \u0022skin-oasis\u0022 )\t\tarr[i] = null;\r\n}\r\n\r\narr.join(\u0022 \u0022);","IsDeferred":false},{"Name":"Split and Join","Code":"let re = new RegExp(name \u002B \u0022(?:\u0022 \u002B sep \u002B \u0022|$)\u0022);\r\n\r\nlet arr = str.split(re);\r\nfor (i = 0; i \u003C arr.length; \u002B\u002Bi)\r\n{\r\n if ( arr[i] == \u0022skin-oasis\u0022 )\t\tarr[i] = null;\r\n}\r\n\r\narr.join(\u0022 \u0022);","IsDeferred":false}]}