API Reference › Regex › Regex.end
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 value
nthe group number

Example

program Demo {
  entry {
    let m = Regex.find("hi there", "hi")
    print(Regex.end(m, 0))
  }
}
← All symbols