0
我需要确认域扩展名是否存在。正则表达式匹配域扩展
到目前为止,我还没有能够得到一个匹配域扩展
凡域名可以有通配符:gmail.com,msn.com,mac.com,comcast.net
DomainPartOfEmail = Right(temp, (Len(temp) - temp.LastIndexOf("@") - 1))
If Regex.IsMatch(DomainPartOfEmail, "*.edu? | *.com? | *.net? | *.org?", RegexOptions.IgnoreCase) Then
ValidDomain = True
End If
你甚至可以省略'。*'(因为该模式并不固定在输入字符串的开头) –