Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t As New uCalc.Transformer() t.FromTo("this", "THAT") Dim text As String = "transform this but not // this in a comment" Console.WriteLine("--- Before --- ") '// Initially, the comment is treated as regular text. Console.WriteLine(t.Transform(text)) '// Add a token for C-style comments and classify it as whitespace. t.Tokens.Add("//.*", TokenType.Whitespace) Console.WriteLine("") Console.WriteLine("--- After --- ") '// Re-run the transform. The comment is now ignored. Console.WriteLine(t.Transform(text)) End Sub End Module