Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t = uc.NewTransformer() Dim txt = "
xyz
Hello
World
" t.Text = txt '// Parent rule matches thetag. Its local transformer then extracts the 'id' attribute. Dim parentRule = t.Pattern("
") parentRule.LocalTransformer.FromTo("id={@string:id}", "{id}") t.Filter() Console.WriteLine("--- All Matches (Parent and Child) ---") Console.WriteLine(t.GetMatches(MatchesOption.All).Text) Console.WriteLine("") Console.WriteLine("--- RootLevelOnly (Parent Matches) ---") Console.WriteLine(t.GetMatches(MatchesOption.RootLevelOnly).Text) Console.WriteLine("") Console.WriteLine("--- InnermostOnly (Child Matches) ---") Console.WriteLine(t.GetMatches(MatchesOption.InnermostOnly).Text) End Sub End Module