Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
A pluggable regular expression engine.
val make : string -> t
Compiles a regular expression.
val get_substring : substrings -> int -> string option
Extracts a single substring. Returns None if the group did not match.
val get_all_substrings : substrings -> string array
Extracts all the matched substrings. Includes the full match at index 0. If a subpattern did not capture a substring, the empty string is returned in the corresponding position instead.
val exec : rex:t -> pos:int -> Bytes.t -> substrings option
Attemts to match the byte-buffer with a regular expression, starting from the position pos
. Returns the matched substrings or None
on failure.