{"ScriptPreparationCode":"var acceptHeader = \u0027image/*, */*\u0027;\r\nvar mimes = [\u0027image/avif\u0027, \u0027image/webp\u0027];\r\nvar accepts = \u0027image/avif,image/webp,image/apng,image/svg\u002Bxml,image/*,*/*;q=0.8\u0027;","TestCases":[{"Name":"Match","Code":"var regex = new RegExp(\u0060(${mimes.join(\u0027|\u0027)})(,|;|$)\u0060, \u0027i\u0027);\r\nvar match = accepts.match(regex);\r\nif (match){\r\n\tacceptHeader = match[1];\r\n}","IsDeferred":false},{"Name":"Exec","Code":"var regex = new RegExp(\u0060(${mimes.join(\u0027|\u0027)})(?=,|;|$)\u0060, \u0027i\u0027);\r\nvar match = regex.exec(accepts);\r\nif (match){\r\n\tacceptHeader = match[0];\r\n}","IsDeferred":false},{"Name":"Exec Non-Capturing","Code":"var regex = new RegExp(\u0060(?:${mimes.join(\u0027|\u0027)})(?=,|;|$)\u0060, \u0027i\u0027);\r\nvar match = regex.exec(accepts);\r\nif (match){\r\n\tacceptHeader = match[0];\r\n}","IsDeferred":false},{"Name":"Match non capturing","Code":"var regex = new RegExp(\u0060(?:${mimes.join(\u0027|\u0027)})(?=,|;|$)\u0060, \u0027i\u0027);\r\nvar match = accepts.match(regex);\r\nif (match){\r\n\tacceptHeader = match[0];\r\n}","IsDeferred":false}]}