public static string JoinAllCaptures(this MatchCollection matches, string separator = "") { ArgCheck.NotNull(nameof(matches), matches); return(string.Join(separator, matches.OfType <Match>().Select(m => m.GetFirstInnerMostGroupCapture()))); }