使用正则表达式vb从网址提取根域名
发布时间:2020-12-14 04:34:04 所属栏目:百科 来源:网络整理
导读:Imports System.Text.RegularExpressions Dim MatchVale As String = String.Empty Dim myrule As New Regex("(^(w*://)?(w*.)+(com.cn|com|net.cn|net|org.cn|org|gov.cn|gov|cn|mobi|me|info|name|biz|cc|tv|asia|hk|网络|公司|中国)).*$") Dim m As Ma
Imports System.Text.RegularExpressions
Dim m As Match = myrule.Match(url) MatchVale = m.Groups(1).ToString Return MatchVale (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |