12345678910111213141516171819202122232425262728293031323334353637383940414243openCoremoduletypeS=sig(** A value of type ['a t] is a regex that parses ['a]s.
The matching is implemented using Re2.
UTF-8 is supported by Re2 but not by this module. This is because we want to use
[char] as a character type, but that's just wrong in a multibyte encoding. *)type'at[@@derivingsexp_of]includeRegex_parser_intf.Swithtype'at:='at(** [to_regex_string] and [to_re2] both forget what a ['a t] knows
about turning the matching strings into ['a]s *)valto_regex_string:_t->stringvalto_re2:?case_sensitive:bool->_t->Regex.t(** [of_re2 r] forgets the options that [r] was compiled with, instead using
[`Encoding_latin1 true], [`Dot_nl true], and the case-sensitivity setting of the
overall pattern. You can still try and use '(?flags:re)' Re2 syntax to set options
for the scope of this regex.
The returned values are precisely the captures of the underlying regex, in order:
note that unlike (say) [Re2.Match.get_all], the whole match is *not* included (if
you want that, just use [capture]). Named captures are not accessible by name. *)valof_re2:Regex.t->stringoptionarraytendmoduletypeParser=sigtype'atmoduleOpen_on_rhs_intf:sigmoduletypeS=Swithtype'at='atendincludeApplicative.Let_syntaxwithtype'at:='atwithmoduleOpen_on_rhs_intf:=Open_on_rhs_intfincludeOpen_on_rhs_intf.Swithtype'at:='atend