Sub CountOccurrences4(text As String, match As String, matchcsase As Boolean) As Int
If matchcsase Then
Return (text.Length - text.Replace(match, "").Length)/match.Length
End If
Return (text.Length - text.tolowercase.Replace(match.ToLowerCase, "").Length)/match.Length
End Sub