Is it possible to convert GroupCollection to List or IEnumerable?

c#

Solution

Sure

GroupCollection col = ...;
IEnumerable<Group> enumerable = col.Cast<Group>();
List<Group> list = col.Cast<Group>().ToList();

Problem

Is it possible to convert a `GroupCollection` to a `List` or an `IEnumerable`? I'm referring to the `GroupCollection` in regular expressions.

Original source