Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t As New uCalc.Transformer()
      Dim rule = t.FromTo("ERROR", "[ERR]")
      rule.GlobalMaximum = 2
      
      '// This input has 3 matches, which exceeds the maximum of 2.
      Dim input1 As String = "ERROR 1, ERROR 2, ERROR 3"
      t.Transform(input1)
      Console.WriteLine($"Input 1 Match Count: {t.Matches.Count()}") '// Expect 0
      
      '// This input has 2 matches, which is within the limit.
      Dim input2 As String = "ERROR 1, ERROR 2"
      t.Transform(input2)
      Console.WriteLine($"Input 2 Match Count: {t.Matches.Count()}") '// Expect 2
      Console.WriteLine(t)
   End Sub
End Module