Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim t = uc.NewTransformer()
t.Text = "
First
Blah Blah
Testing
Second
"
'// ^ ^ ^ ^
'// 012345678901234567890123456789012345678901234567890123456789
'// 0 10 20 30 40 50
'// Carrets (^) point to Start and End locations of the matches
Console.WriteLine(t.Text)
Console.WriteLine("")
t.Pattern("<{tag}>{etc}{tag}>")
t.Find()
Dim Matches = t.Matches
Console.WriteLine(Matches(0).Text)
Console.WriteLine($"Start pos: {Matches(0).StartPosition}")
Console.WriteLine($"End pos: {Matches(0).EndPosition}")
Console.WriteLine($"Length: {Matches(0).Length}")
Console.WriteLine("")
Console.WriteLine(Matches(1).Text)
Console.WriteLine($"Start pos: {Matches(1).StartPosition}")
Console.WriteLine($"End pos: {Matches(1).EndPosition}")
Console.WriteLine($"Length: {Matches(1).Length}")
End Sub
End Module