klyn.regex.RegExMatcher.end
method

    public native end(index as Int = 0) as Int

Description

Returns the exclusive end offset of a captured group in the input.

Parameters

Parameter | Description
--- | ---
`index` | Zero-based capture-group index. Group `0` is the full match.

Returns

The absolute end offset, or `-1` for an unmatched optional group.

Throws

- IllegalStateException if no successful match is current.
- IndexException if the group index is invalid.

Example

    matcher = RegEx(r"\d+").matcher("value=42")
    if matcher.find():
    print(matcher.end())  # 8