function UserAgent(userAgent) dim platform,agetPart,browser,regex,omatches,omatch dim browserV,platformV if instr(Ucase(userAgent),"DOCOMO") > 0 then platform = "DoCoMo" agetPart = split(userAgent,"/") browser = "DoCoMo" if instr(agetPart(0),"(") > 0 then set regex = new RegExp regex.pattern = "([0-9]\.[0-9])\s([^\(]*)(.*)" set omatches = regex.execute(agetPart(0)) set omatch = omatches(0) browserV = omatch.submatches(0) platformV = omatch.submatches(1) else browserV = agetPart(0) platformV = agetPart(1) end if end if UserAgent = array(platform, platformV, browser, browserV) end function