我一直在搜索 Stackoverflow,但找不到可以帮助我的确切线程。
我的问题是,我希望能够找到并取出字符串中出现的任何 8 位数字。
Dim SetOfMatches As MatchCollection
Dim MyRegex As New Regex("A^\d{8}$A")
Dim TestString As String = "testing 12345678 testing"
myMatches = myRegex.Matches(TestString)
For each Row as Match in myMatches
console.writeline(row.value)
Next
这不会产生任何点击。但我想在字符串中间找到 8 位数字。
我在 RegEx 中非常基础。
任何帮助都会很棒!