Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t = uc.NewTransformer()
      t.Text = "An apple and a car."
      
      '// Define two separate rules
      t.FromTo("apple", "[FRUIT]")
      t.FromTo("car", "[VEHICLE]")
      
      t.Find()
      
      Dim matches = t.Matches
      Console.WriteLine($"Found {matches.Count()} matches:")
      For Each match In matches
         Dim rule = match.Rule
         Console.WriteLine($"- Matched '{match.Text}' using pattern: '{rule.Pattern}'")
      Next
   End Sub
End Module