Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t As New uCalc.Transformer() t.Text = "Log: INFO message. Log: ERROR alert. Log: INFO another message." Dim infoRule = t.Pattern("Log: INFO {msg}.").SetTag(1) '// Tag 1 for INFO Dim errorRule = t.Pattern("Log: ERROR {msg}.").SetTag(99) '// Tag 99 for ERROR t.Find() For Each match In t.Matches Dim ruleTag = match.Rule.Tag If ruleTag = 1 Then Console.WriteLine($"Found informational log: {match.Text}") End If If ruleTag = 99 Then Console.WriteLine($"!!! Found CRITICAL error: {match.Text} !!!") End If Next End Sub End Module