method
Regex.end
Regex.end(match, n) -> int
Returns the byte offset just past the end of group n of match, or -1 if the group did not participate. Feed Regex.end(m, 0) back into Regex.next to walk every match.
Parameters
matcha Match valuenthe group numberExample
program Demo {
entry {
let m = Regex.find("hi there", "hi")
print(Regex.end(m, 0))
}
}