I'm trying to find the index of the first word detected by this pattern.
val text = " _his_ fancy;"
val startIndex = 0
val pattern: Regex = "[a-zA-z0-9]".toRegex()
var match = pattern.find(text, startIndex)
println(idx)
However, when I ran this I got index of 1 instead of 2. Can someone please tell me what I did wrong?