I would expect these lines of C#:
var regex = new Regex("A(bC*)*");
var match = regex.Match("AbCCbbCbCCCCbbb");
var groups = match.Groups;
to return something like:
["AbCCbbCbCCCCbbb", "A", "bCC", "b", "bC", "bCCC", "b", "b", "b"]
but instead it returns only the last captured match:
["AbCCbbCbCCCCbbb", "b"]
Here Regex101 also displays the following as a warning:
A repeated capturing group will only capture the last iteration. Put a capturing group around the repeated group to capture all iterations or use a non-capturing group instead if you're not interested in the data
How should I change my regex pattern?