public static List<string> ToList (this MatchCollection matches)
{
return matches.Cast<Match> ()
// flatten to single list
.SelectMany (o =>
// extract captured results
o.Groups.Cast<Capture> ()
// don't need the pattern
.Skip (1)
.Select (c => c.Value)).ToList ();
}
}