using uCalcSoftware;

var uc = new uCalc();
var t = new uCalc.Transformer();
var logText = "INFO: System start. WARN: Low disk. ERROR: DB connection failed.";
t.Text = logText;

// Define rules for different log levels
var errorRule = t.Pattern("ERROR: {msg}.");
var warnRule = t.Pattern("WARN: {msg}.");
var infoRule = t.Pattern("INFO: {msg}.");

t.Find();

Console.WriteLine("--- Analysis of All Matches ---");
foreach(var match in t.Matches) {
   // Use the match's Rule property to get the name of the rule that found it
   Console.WriteLine($"Found '{match.Text}' using rule: '{match.Rule.Name}'");
}