JSFiddle - React, Tailwind, and code Playground

by Nick Craver

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">

JavaScript

var string = 'function onclick(event) { window.location.href = "index.html?q1=v1&g2=v2"; }';
var url = string.match(/"(.*?)"/)[1];
alert(url); // == index.html?q1=v1&g2=v2, without quotes