Regexp.last_match(1) code example
Example 1: c# regex find last match
Regex.Match(s, @"\[\[(.*?)\]\]", RegexOptions.RightToLeft)
Example 2: regex last match
Just use "$" to specify matching a pattern at the end of each line.
Example with grep:
grep "pattern$" file.txt