using System.Text.RegularExpressions;
public static void Main()
var lastline = @"{E\ansi\RTFDATA\E\rtfl\E\ansiSIGNED ELECTRONICALLY by John Smith\RTFDATA}||||||F|||20220502213000";
var regex = new Regex(@"[A-Z]{3}");
var matches = regex.Matches(lastline);
foreach(var match in matches.Cast<Match>())
Console.WriteLine($"Matched on: {match.Value}");