Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t As New uCalc.Transformer() t.FromTo("{@Alpha:word}", "[{word}]") Dim text As String = "id-E123 is a special-identifier." Console.WriteLine("--- Before --- ") '// By default, 'id-123' is tokenized as three separate parts: 'id', '-', and '123'. Console.WriteLine(t.Transform(text)) '// Get the alphanumeric token item by its name and modify its regex. Dim alphaToken = t.Tokens("_token_alphanumeric") alphaToken.Regex = "[a-zA-Z0-9-]+" Console.WriteLine("") Console.WriteLine("--- After --- ") '// Now, hyphenated words are matched as single alphanumeric tokens. Console.WriteLine(t.Transform(text)) End Sub End Module