Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Get the transformer that pre-processes expressions. Dim t = uc.ExpressionTransformer '// Define a rule to find "X in to cm" and replace it with the calculated value. '// Note: 'val' is captured as text and must be converted to a number with Double(). t.FromTo("{@Number:val} in to cm", "({@Eval: Double(val) * 2.54})") '// Use the new syntax directly in an expression. Console.WriteLine(uc.EvalStr("10 in to cm")) End Sub End Module