public static string GetLastInstanceOf(string sentence)
{
string returnValue = sentence;
var matches = System.Text.RegularExpressions.Regex.Matches(sentence, @"\(([^)]*)\)");
if (matches.Count > 0)
{
returnValue = matches.Last().Groups[1].Value;
}
return returnValue;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter