
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,"."))&"级域名"
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,"."))&"级域名"