Regex.Submatches.Count
and the regex values would be kept in:
Regex.Submatches(0)
but how would you do the same thing in the .NET Regex class I found 2 things that might be it but none of them worked well for me: "Groups" and "Captures" I don't know which one holds submatches though. By submatch I am reffering to a string kept between brackets
For example if my regex was "Name: (\w) - Age: (\d)" then I would have 2 submatches one would be my name matched by \w and the other one would be my age matched by \d.
Any idea how I can do this
Thanks in advance
(Moderator: Thread moved to the Regular Expression Forum and Title tweaked for quicker thread understanding during a search)

Count Submatches in a Regex
LukaSoFt