Dim m As Matcher = Regex.Matcher2('pattern', 'options', 'text')
Do While m.Find
Log("Match: " & m.Match)
For g = 1 To m.GroupCount
Log("Group #" & g & ": " & m.Group(g))
Next
Loop
although in your case, it looks like you only expect one match, so you might be better with an If rather than a loop:
B4X:
Dim Pattern As String = "(.*)[\/\\]"
Dim Text As String = "/book/assets/img/logo.png"
Dim m As Matcher = Regex.Matcher(Pattern, Text)
If m.Find Then
Log("Match: " & m.Match)
Else
Log("Nice try, no cigar.") 'or whatever is to be done if no match found :-)
End If
Oh, thanks for the answers, I misunderstood the behavior of regex.isMatch. I thought It returns true if at least one one partial match was found, similar to match.find