JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test"></div>
JavaScript
var regex = /([^=&?]+)=([^&]+)/g;
var out = "";
while( (match = regex.exec("?page=3&Name=Alex")) !== null)
{
out += match[1] + "<br/>";
}
$('#test').html(out);