using uCalcSoftware; var uc = new uCalc(); var t = new uCalc.Transformer(); t.Text = "[INFO] System boot. [ERROR] Connection failed. [INFO] Retrying..."; t.Pattern("'['ERROR']' {msg}."); t.Find(); Console.WriteLine($"Found {t.Matches.Count()} error(s):"); foreach(var match in t.Matches) { Console.WriteLine($"- '{match.Text}' starts at index {match.StartPosition}"); }