正则匹配顶级域名

var reg = /((http|https)?):\/\/(.*)(\.(baidu)(\.[\w\-]+)+)(\/.*)?/;

你可能感兴趣的:(正则匹配顶级域名)