Ask the old SJ to write a paragraph to regularly match the parameters specified in the string.

str = "http://bbs.aa.cc/avatar.php?uid=157135&size=large"

"

I want to match uid=157135,
and the position where this parameter appears is not necessarily fixed.
for example, put at the end: http://bbs.aa.cc/avatar.php?s.
or first


function GetQueryString (name) {

var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;

}

GetQueryString ('uid')


  http://regex.zjmainstay.cn/r/.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34b78-2bf4c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34b78-2bf4c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?