这样修改代码
Dim pattern As String = "^[0-9]{11}$|^[0-9]{11},[0-9]{11}$"Dim str = "13827222227,13827126079"Dim reg As new System.Text.RegularExpressions.Regex(pattern)If reg.Ismatch(str) = True Then msgbox("匹配")End If