Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t As New uCalc.Transformer() Dim logText = "INFO: System start. WARN: Low disk. ERROR: DB connection failed." t.Text = logText '// Define rules for different log levels Dim errorRule = t.Pattern("ERROR: {msg}.") Dim warnRule = t.Pattern("WARN: {msg}.") Dim infoRule = t.Pattern("INFO: {msg}.") t.Find() Console.WriteLine("--- Analysis of All Matches ---") For Each 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}'") Next End Sub End Module