asp判断域名为几级域名
程序代码:
Dim domain,url,re url="http://www." 'url是要判断的网址.. Set re=new regExp re.Global=True re.Ignorecase=True re.pattern="^((?:http:\/\/)?[^\/]*)(?:(?:\/?)|(?:\/.*))" url=re.Replace(url,"$1") domain=Replace(url,"http://","") domain=Replace(domain,"www.","") response.write url&"<br />是"&UBound(Split(domain,"."))&"级域名"