Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// This examples shows the default match by '// token mode, as well as how to reconfigure '// it in order to do match by character '// along with a whitespace variation Dim t = uc.NewTransformer() Dim txt = "This is an island test, I said." t.FromTo("is", "") Console.WriteLine(t.Transform(txt)) Console.WriteLine("") t.Tokens.Description = "Match by character" t.Tokens.Add(".") '// This overrides existing tokens t.FromTo("is", "") Console.WriteLine(t.Tokens.Description) Console.WriteLine(t.Transform(txt)) Console.WriteLine("") '// Note: whitespace sensitivity is off by default '// Whitespace token is re-introduced '// (after being overridden in the previous Token Add()) t.Tokens.Description = "By char + whitespace ignored" t.Tokens.Add("[\\t\\v ]+", TokenType.Whitespace) t.FromTo("is", "<{@Self}>") Console.WriteLine(t.Tokens.Description) Console.WriteLine(t.Transform(txt)) End Sub End Module