Is this a weird issue or am I missing something here?
Ismatch2 is not matching but with .Matcher2 and same pattern and string it matches.
Ismatch2 is not matching but with .Matcher2 and same pattern and string it matches.
B4X:
Dim str="This is a sample line but it is Highly recommen4ded to not rely on speculations"
Dim pattern As String = "([^a-zA-Z]|^)("& "high" &")"
If Regex.IsMatch2( pattern, Regex.CASE_INSENSITIVE ,str) Then Log("isMatch matched")
Dim m As Matcher = Regex.Matcher2( pattern, Regex.CASE_INSENSITIVE,str)
If m.Find Then Log("Matcher2 Matched")