sig
  type regexp = Re.re
  type flag = [ `ANCHORED | `CASELESS | `MULTILINE ]
  type groups = Re.groups
  type split_result =
      Text of string
    | Delim of string
    | Group of int * string
    | NoGroup
  val re : ?flags:Re_pcre.flag list -> string -> Re.t
  val regexp : ?flags:Re_pcre.flag list -> string -> Re_pcre.regexp
  val extract : rex:Re_pcre.regexp -> string -> string array
  val exec : rex:Re_pcre.regexp -> ?pos:int -> string -> Re_pcre.groups
  val get_substring : Re_pcre.groups -> int -> string
  val get_substring_ofs : Re_pcre.groups -> int -> int * int
  val pmatch : rex:Re_pcre.regexp -> string -> bool
  val substitute : rex:Re.re -> subst:(string -> string) -> string -> string
  val full_split :
    ?max:int -> rex:Re_pcre.regexp -> string -> Re_pcre.split_result list
  val split : rex:Re_pcre.regexp -> string -> string list
  val quote : string -> string
  type substrings = Re.groups
end