{"ScriptPreparationCode":"var strUrl = \u0027https://website.com/?blahRef=766f2afedcc311ea3333a6ba9e46292aae400001\u0026sdtid=14265950\u0026sdop=1\u0026sdpid=139549172\u0026sdfid=9\u0026lno=1\u0026trd=https%20www%20othersite%20com%20p%20germ%20x%20o%20\u0026pv=\u0026au=\u0026sdttt=jjj%7Crecombbb%7C25b08e67-1a86-44e1-aae9-73920b9b44c2\u0026u2=https%3A%2F%2Fwww.website.com%2Fp%2Fgerm-x-original-hand-sanitizer-32-fl-oz%2F-%2FA-797633334642\u0027;","TestCases":[{"Name":"Match RegEx via Lookahead and Capture Group","Code":"strUrl.match(/(?:.\u002B)(?=http)(.\u002B)/)[1];","IsDeferred":false},{"Name":"Replace Unwanted Parts with Replace RegEx","Code":"strUrl.replace(/(?:.\u002B)(?=http)/g,\u0027\u0027);","IsDeferred":false},{"Name":"String Split and Reference Array Index with length -1 (const intermediate)","Code":"var arrStringSplitLen = strUrl.split(\u0027http\u0027);\r\n\u0027http\u0027\u002BarrStringSplitLen[arrStringSplitLen.length-1];","IsDeferred":false},{"Name":"String Split and Reference Array Index with length -1 (var intermediate)","Code":"\u0027http\u0027\u002BstrUrl.split(\u0027http\u0027).pop();","IsDeferred":false},{"Name":"String Split and Reference Array Index with length -1 (no intermediate var)","Code":"strUrl.substr(strUrl.lastIndexOf(\u0027http\u0027));","IsDeferred":false},{"Name":"String Split with pop","Code":"strUrl.slice(strUrl.lastIndexOf(\u0027http\u0027));","IsDeferred":false}]}