{"ScriptPreparationCode":"const testString = \u0022This \u2013 is \u2013 a \u2013test \u2013string \u2013 with \u2013 multiple \u2013 instances\u2013 of\u2013the \u2013 pattern \u2013 and \u2013 some \u2013 variations \u2013 like\u2013this \u2013and this\u2013 \u0022;\r\nconst regex1 = /(?\u003C= )\u2013(?= )|(?\u003C! )\u2013 (?! )| \u2013(?\u003C! ) ?/g;\r\nconst regex2 = / (?=\u2013)\u2013? ?|\u2013 /g;\r\nconst regex3 = /(?\u003C= )\u2013(?! )|\u2013(?= )|(?\u003C! )\u2013 (?! )/g;\r\nconst regex4step1 = / \u002B\u2013 \u002B/g; // Remove cases with spaces on both sides\r\nconst regex4step2 = / \u002B\u2013|\u2013 \u002B/g; // Remove extra spaces\r\nconst regex5 = / \u2013 | \u2013|\u2013 /g;\r\nconst regex6 = / \u2013 ?|\u2013 /g;","TestCases":[{"Name":"Option 1 (Lookarounds)","Code":"testString.replace(regex1, \u0022\u2014\u0022);","IsDeferred":false},{"Name":"Option 2 (Simple Lookaround)","Code":"testString.replace(regex2, \u0022\u2014\u0022);","IsDeferred":false},{"Name":"Option 3 (Clever)","Code":"testString.replace(regex3, \u0022$1\u2014\u0022);","IsDeferred":false},{"Name":"Option 4 (Two-Pass)","Code":"testString.replace(regex4step1, \u0022 \u2013 \u0022).replace(regex4step2, \u0022\u2014\u0022);","IsDeferred":false},{"Name":"Option 5 (Normal)","Code":"testString.replace(regex5, \u0022\u2014\u0022);","IsDeferred":false},{"Name":"Option 6 (I Am Dumb)","Code":"testString.replace(regex6, \u0022\u2014\u0022);","IsDeferred":false}]}