package oniguruma

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

Match results.

type t

The capture groups returned by a search or match.

val length : t -> int

length region gets the number of captures.

val 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.

val 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.