Dim s As String = "大叔大婶多伟1564585421大 打算的15645854214采访人 15sdf6s54df6fs544防守打法 发送到"
Dim p As String = "(13[0-9]|14[0-9]|15[0-9]|166|17[0-9]|18[0-9]|19[8|9])\d{8}"
Dim rgx = new System.Text.RegularExpressions.Regex(p, System.Text.RegularExpressions.RegexOptions.IgnoreCase)
For Each match As System.Text.RegularExpressions.Match In rgx.Matches(s)
Output.Show(match.Value )
Next
这样可以提取电话号码。我如果需要提取金额怎么用不了?
Dim s As String="收到现金2.22元"
Dim p As String = "^([1-9]\d{0,9}|0)(\.\d{1,2})?$"
Dim rgx = new System.Text.RegularExpressions.Regex(p, System.Text.RegularExpressions.RegexOptions.IgnoreCase)
For Each m As object In rgx.Matches(s)
Output.Show(m.value)
Next