dune-private-libs.dune_re
Dune_re.Pcre
dune-private-libs.cache
dune-private-libs.dune-lang
dune-private-libs.dune-section
dune-private-libs.dune_csexp
dune-private-libs.dune_util
dune-private-libs.filesystem_stubs
dune-private-libs.meta_parser
dune-private-libs.ocaml-config
dune-private-libs.stdune
dune-private-libs.xdg
type regexp
type flag = [
| `CASELESS
| `MULTILINE
| `ANCHORED
]
type groups
type split_result =
| Text of string
Text part of splitted string
| Delim of string
Delimiter part of splitted string
| Group of int * string
Subgroup of matched delimiter (subgroup_nr, subgroup_str)
| NoGroup
Unmatched subgroup
Result of a Pcre.full_split
Pcre.full_split
val re : ?flags:flag list -> string -> Dune_re__.Core.t
re ~flags s creates the regexp s using the pcre syntax.
re ~flags s
s
val regexp : ?flags:flag list -> string -> regexp
re ~flags s compiles the regexp s using the pcre syntax.
val extract : rex:regexp -> string -> string array
extract ~rex s executes rex on s and returns the matching groups.
extract ~rex s
rex
val exec : rex:regexp -> ?pos:int -> string -> groups
Equivalent to Core.exec.
Core.exec
val get_substring : groups -> int -> string
Equivalent to Core.Group.get.
Core.Group.get
val get_substring_ofs : groups -> int -> int * int
Equivalent to Core.Group.offset.
Core.Group.offset
val pmatch : rex:regexp -> string -> bool
Equivalent to Core.execp.
Core.execp
val substitute : rex:Dune_re__.Core.re -> subst:(string -> string) -> string -> string
val full_split : ?max:int -> rex:regexp -> string -> split_result list
val split : rex:regexp -> string -> string list
val quote : string -> string
type substrings = Group.t