Regexp.ResultSourceMatching results.
This handles the weird array returned by exec or match'.
The type for regular expression matching results.
fold_groups f r acc folds f over the content of all capturing groups (named included) in r starting with acc. This is acc if there is no group.
fold_group_indices f r acc is like fold_groups but f is given the start and stop index of the group which indicate it spans the indices [start;stop-1] of input.
Warning. The regexp needs the d flag for this to yield results otherwise the function simply returns acc.
fold_named_groups f r acc folds f over the content of named capturing groups in r starting with acc.
val fold_named_group_indices :
(name:Jstr.t -> start:int -> stop:int -> 'a -> 'a) ->
t ->
'a ->
'afold_named_group_indices f r acc is like fold_named_groups but f is given the start and stop index of the group which indicate it spans the indices [start;stop-1] of input.
Warning. The regexp needs the d flag for this to yield results otherwise the function simply returns acc.