package oniguruma

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Oniguruma.RegionSource

Match results.

Sourcetype t

The capture groups returned by a search or match.

Sourceval length : t -> int

length region gets the number of captures.

Sourceval capture_beg : t -> int -> int

capture_beg region idx gets the string position of the capture at the index. The capture at index 0 is the entire match. The string position is an offset in bytes. Returns -1 if the capture group wasn't found. Raises Invalid_argument if the index is out of bounds.

Sourceval capture_end : t -> int -> int

capture_end region idx gets the string position of the capture at the index. The capture at index 0 is the entire match. The string position is an offset in bytes. Returns -1 if the capture group wasn't found. Raises Invalid_argument if the index is out of bounds.