{"ScriptPreparationCode":null,"TestCases":[{"Name":".matchAll() RegExp","Code":"const testString = \u0022This is OpieOP a Twitch Message Kappa Kappa that contains WeirdChamp some emotes! BibleThump WeirdChamp\u0022;\r\nconst regExp = new RegExp(\u0022\\\\b(Kappa|OpieOP|BibleThump|Keepo|WeirdChamp)\\\\b\u0022, \u0022g\u0022);\r\n\r\ntestString.matchAll(regExp);","IsDeferred":false},{"Name":".matchAll() regex","Code":"const testString = \u0022This is OpieOP a Twitch Message Kappa Kappa that contains WeirdChamp some emotes! BibleThump WeirdChamp\u0022;\r\nconst regex = /\\\\b(Kappa|OpieOP|BibleThump|Keepo|WeirdChamp)\\\\b/g;\r\n\r\ntestString.matchAll(regex);","IsDeferred":false},{"Name":".indexOf() with list","Code":"const testString = \u0022This is OpieOP a Twitch Message Kappa Kappa that contains WeirdChamp some emotes! BibleThump WeirdChamp\u0022;\r\nconst emotes = [\u0022Kappa\u0022, \u0022OpieOP\u0022, \u0022BibleThump\u0022, \u0022Keepo\u0022, \u0022WeirdChamp\u0022];\r\n\r\nconst results = {};\r\n\r\nfor (const emote of emotes) {\r\n let index = 0;\r\n while (index !== -1 \u0026\u0026 index !== testString.length) {\r\n index = testString.indexOf(emote, index \u002B 1);\r\n if (results[emote])\r\n results[emote].push(index);\r\n else\r\n results[emote] = [index];\r\n }\r\n}","IsDeferred":false}]}