Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t As 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):")
      For Each match In t.Matches
         Console.WriteLine($"- '{match.Text}' starts at index {match.StartPosition}")
      Next
   End Sub
End Module