I\'m using the following to extract variables from a URL contained in a variable. It works fine in modern browsers but in IE8 it fails on the first variable but succeeds on
/* Get Height */
var h = p.match(/height=([0-9]+)/);
h = h[1];
if (!h) {h = 500};
alert(h);
/* Get Width */
var w = p.match(/width=([0-9]+)/);
w = w[1];
if (!w) {w = 800};
alert(w);