I need to parse url in JavaScript.
Here is my code:
var myRe = /\?*([^=]*)=([^&]*)/;
var myArray = myRe.exec("?page=3&Name=Alex");
for(var i=1;i<myArray.length;i++)
{
alert(myArray[i]);
}
Unfortunately it only works for first name=value
pair.
How I can correct my code?