Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t = uc.NewTransformer() t.Text = "Find the longest word in this sentence." t.Pattern("{@Alpha}") '// Match all words t.Find() Dim maxLength As Integer = 0 Dim longestWord As String = "" For Each match In t.Matches If match.Length > maxLength Then maxLength = match.Length longestWord = match.Text End If Next Console.WriteLine($"Longest word is '{longestWord}' with length: {maxLength}") End Sub End Module