{"ScriptPreparationCode":"var IMAGE_SIZE_REGEX = /\\/s\\d{2,3}\\//;\r\nvar IMAGE_SIZE_REGEX_GROUPS = /(.\u002B)?\\/s\\d{2,3}\\/(.\u002B)?/;\r\n\r\nfunction parseImageUrl(url) {\r\n const found = url.match(IMAGE_SIZE_REGEX);\r\n\r\n if (!found) {\r\n return null;\r\n }\r\n const { index } = found;\r\n const sizeStringLength = found[0].length;\r\n\r\n return {\r\n prefix: url.slice(0, index),\r\n suffix: url.slice(sizeStringLength \u002B index),\r\n };\r\n}\r\n\r\nfunction parseImageGroups(url) {\r\n const found = url.match(IMAGE_SIZE_REGEX_GROUPS);\r\n\r\n if (!found) {\r\n return null;\r\n }\r\n\r\n return {\r\n prefix: found[1],\r\n suffix: found[2],\r\n };\r\n}","TestCases":[{"Name":"slice","Code":"parseImageUrl(\u0027prefix/s480/suffix\u0027);","IsDeferred":false},{"Name":"groups","Code":"parseImageGroups(\u0027prefix/s480/suffix\u0027);","IsDeferred":false}]}