The input string is:
<input type="hidden" name="locale" value="us">
The regex pattern is:
Dim r As New Regex("<input\s{0,}(?:(name|type|value)=""([^""]+)""\s{0,})+>")
The code being used:
If r.IsMatch(s) Then
For Each m As Match In r.Matches(s)
Debug.Print(m.ToString)
For i As Integer = 0 To m.Groups.Count - 1
Debug.Print(New String(" "c, i + 1) & "-" & m.Groups(i).Value)
Next
Next
End If
The output:
<input type="hidden" name="locale" value="us">
-<input type="hidden" name="locale" value="us">
-value
-us
I would expect it to match:
-type
-hidden
-name
-locale
-value
-us
The alternate pattern used goes by the order it is provided in, perhaps that's why it's only spitting out one group, which is the last match.