Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t1 = uc.NewTransformer() Dim CommentRegex = "/\*([\s\S]*?)\*/" Dim WhitespaceToken = t1.Tokens.Add(CommentRegex, TokenType.Whitespace) WhitespaceToken.Description = "Treats text between /* and */ as whitespace" Dim txt = "a b, a /* comment a b */ b, a x b, ab, a b, a, b" Dim t2 = uc.NewTransformer() t2.FromTo("a b", "<{@Self}>") t2.Transform(txt) Console.WriteLine(t2) '// The token defined in the other transformer (WhitespaceToken) is imported into this one. '// Now, everything between /* and */ will be treated as whitespace t2.Tokens.Add(WhitespaceToken) Console.WriteLine(t2.Transform(txt)) End Sub End Module