Dim sentence = "There is NO End to the end of the Covid19" As String 'works
Dim pat As String ="end"
Dim l As List
l.Initialize
Dim m As Matcher
m = Regex.Matcher2(pat, Regex.CASE_INSENSITIVE, sentence) 'Matcher2 not Matcher
Do While m.Find
Log(m.Match)
l.Add(m.Match)
Loop
Log("-----")
sentence=sentence.ToLowercase
pat=pat.ToLowercase
Dim s() As String =Regex.Split(pat,sentence)
For i=0 To s.Length -1
Log(s(i))
Next