'从字符串中获取cookie信息 function GetCookie(byval headerStr) dim reg:set reg=new regexp dim Matches,Matche with reg .Global=true .Pattern="\r\nSet-Cookie: ([^\r\n]+?);" set Matches=.Execute(headerStr) for each Matche in Matches GetCookie=GetCookie&Matche.SubMatches(0)&"; " next GetCookie=trim(GetCookie) if right(GetCookie,1)=";" then GetCookie=left(GetCookie,len(GetCookie)-1) end with end function