public native start(index as Long = 0) as Long
Returns the inclusive start offset of a captured group in the input. Offsets count Unicode characters, like String indexing, not UTF-8 bytes.
| Parameter | Description |
|---|---|
index | Zero-based capture-group index. Group 0 is the full match. |
The absolute start offset, or -1 for an unmatched optional group.
matcher = RegEx(r"\d+").matcher("value=42")
if matcher.find():
print(matcher.start()) # 6