{"ScriptPreparationCode":"window.stripHtmlSuffix = function(input) {\r\n return input.replace(/\\.html$/, \u0027\u0027);\r\n}\r\n\r\nwindow.dataWithHTML = [];\r\nwindow.dataWithOutHTML = [];\r\nconst possibleChars = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u0022;\r\nconst TOTAL_STRINGS = 1000;\r\n\r\nfunction getRandomInt(max) {\r\n return Math.floor(Math.random() * max);\r\n}\r\n\r\nfunction makeRandomString(len) {\r\n var text = \u0022\u0022;\r\n for (var i = 0; i \u003C len; i\u002B\u002B) {\r\n text \u002B= possibleChars.charAt(getRandomInt(possibleChars.length));\r\n }\r\n return text;\r\n}\r\n\r\nfor(let i=0;i\u003CTOTAL_STRINGS;i\u002B\u002B) {\r\n window.dataWithHTML.push(\r\n \u0060${makeRandomString(100 \u002B getRandomInt(150))}.html\u0060\r\n );\r\n window.dataWithOutHTML.push(\r\n makeRandomString(100 \u002B getRandomInt(150))\r\n );\r\n}\r\n","TestCases":[{"Name":"Regex strip match","Code":"let counter = 0;\r\nfor(let i = 0;i \u003C window.dataWithOutHTML.length; i\u002B\u002B) {\r\n \r\n let dataWithOutHTML = window.dataWithOutHTML[i];\r\n \r\n for(let j = 0;j \u003C window.dataWithHTML.length; j\u002B\u002B) {\r\n \tlet dataWithHTML = window.dataWithHTML[j];\r\n \r\n if (dataWithOutHTML === window.stripHtmlSuffix(dataWithHTML)) {\r\n counter\u002B\u002B;\r\n }\r\n }\r\n}\r\n","IsDeferred":false},{"Name":"Concatenate match string template","Code":"let counter = 0;\r\nfor(let i = 0;i \u003C window.dataWithOutHTML.length; i\u002B\u002B) {\r\n\r\n let dataWithOutHTML = window.dataWithOutHTML[i];\r\n \r\n for(let j = 0;j \u003C window.dataWithHTML.length; j\u002B\u002B) {\r\n \tlet dataWithHTML = window.dataWithHTML[j];\r\n \r\n if (dataWithHTML === \u0060${dataWithOutHTML}.html\u0060) {\r\n counter\u002B\u002B;\r\n }\r\n }\r\n}","IsDeferred":false},{"Name":"Concatenate match with plus","Code":"let counter = 0;\r\nfor(let i = 0;i \u003C window.dataWithOutHTML.length; i\u002B\u002B) {\r\n\r\n let dataWithOutHTML = window.dataWithOutHTML[i];\r\n \r\n for(let j = 0;j \u003C window.dataWithHTML.length; j\u002B\u002B) {\r\n \tlet dataWithHTML = window.dataWithHTML[j];\r\n \r\n if (dataWithHTML === (dataWithOutHTML \u002B \u0027.html\u0027)) {\r\n counter\u002B\u002B;\r\n }\r\n }\r\n}","IsDeferred":false}]}