Module Re_pcreSource
include module type of struct include Re.Pcre end
type groups = Re.Group.ttype split_result = Re.Pcre.split_result = Result of a Pcre.full_split
val re :
?flags:Re_pcre.flag list ->
string ->
(Re__.Ast.cset, [ `Cased | `Uncased ]) Re__.Ast.gen @@ portablere ~flags s creates the regexp s using the pcre syntax.
val re_result :
?flags:Re_pcre.flag list ->
string ->
((Re__.Ast.cset, [ `Cased | `Uncased ]) Re__.Ast.gen,
[ `Not_supported | `Parse_error ])
Stdlib.result @@ portableval regexp : ?flags:Re_pcre.flag list -> string -> Re_pcre.regexp @@ portablere ~flags s compiles the regexp s using the pcre syntax.
val extract : rex:Re_pcre.regexp -> string -> string array @@ portableextract ~rex s executes rex on s and returns the matching groups.
val exec :
rex:Re_pcre.regexp ->
?pos:int ->
string ->
Re_pcre.groups @@ portableEquivalent to Core.exec.
val get_substring : Re_pcre.groups -> int -> string @@ portableEquivalent to Core.Group.get.
val names : Re_pcre.regexp -> string array @@ portableReturn the names of named groups.
val get_named_substring :
Re_pcre.regexp ->
string ->
Re_pcre.groups ->
string @@ portableReturn the first matched named group, or raise Not_found. Prefer to use the non-raising version get_named_substring_opt
val get_named_substring_opt :
Re_pcre.regexp ->
string ->
Re_pcre.groups ->
string option @@ portableReturn the first matched named group, or raise Not_found.
val get_substring_ofs : Re_pcre.groups -> int -> int * int @@ portableEquivalent to Core.Group.offset.
val pmatch : rex:Re_pcre.regexp -> string -> bool @@ portableEquivalent to Core.execp.
val full_split :
?max:int ->
rex:Re_pcre.regexp ->
string ->
Re_pcre.split_result list @@ portableval split : rex:Re_pcre.regexp -> string -> string list @@ portableDeprecated
type substrings = Re.Group.t