``` function GetQueryStringRegExp(name,url) { var reg = new RegExp("(^|\\?|&)" + name + "=([^&]*)(\\s|&|$)", "i"); if (reg.test(url)) return decodeURIComponent(RegExp.$2.replace(/\+/g, " ")); } ```