Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t As New uCalc.Transformer() t.Text = "The apple is an apple." '// Overlapping patterns. The longer one is defined last, so it gets precedence. t.Pattern("apple") t.Pattern("an apple") Console.WriteLine("--- First Find ---") t.Find() '// The first 'apple' matches the first rule. '// The 'an apple' matches the second (higher precedence) rule. Console.WriteLine(t.Matches.Text) '// Re-running find should produce the exact same result Console.WriteLine("--- Second Find (no change) ---") t.Find() Console.WriteLine(t.Matches.Text) End Sub End Module