I'm missing something obvious. I want to use a pattern like "\d{7}"
, and, for an input of "12345678
", get matches of "1234567
" and "2345678
".
It's gotta be easy, right?
C# or VB.Net. Thanks!
Per suggestions, I tried the following code, to no avail (g.ToString is blank each time):
Dim r As New System.Text.RegularExpressions.Regex("(?=\d{7})")
Dim m As MatchCollection = r.Matches("12345678")
For each g As match In m
Console.WriteLine(String.Format("Match is {0}", g.ToString))
Next