c# .net MatchCollection get last value code example Example: c# regex find last match Regex.Match(s, @"\[\[(.*?)\]\]", RegexOptions.RightToLeft)