Module Re

type t
type re
module Group : sig ... end
type groups = Group.t
  • deprecated Use Group.t
val compile : t -> re
val group_count : re -> int
val group_names : re -> (string * int) list
val exec : ?pos:int -> ?len:int -> re -> string -> Group.t
val exec_opt : ?pos:int -> ?len:int -> re -> string -> Group.t option
val execp : ?pos:int -> ?len:int -> re -> string -> bool
val exec_partial : ?pos:int -> ?len:int -> re -> string -> [ `Full | `Mismatch | `Partial ]
val exec_partial_detailed : ?pos:int -> ?len:int -> re -> string -> [ `Full of Group.t | `Mismatch | `Partial of int ]
module Mark : sig ... end
type split_token = [
  1. | `Delim of Group.t
  2. | `Text of string
]
val all : ?pos:int -> ?len:int -> re -> string -> Group.t list
type !'a gen = unit -> 'a option
val all_gen : ?pos:int -> ?len:int -> re -> string -> Group.t gen
  • deprecated Use Seq.all
val all_seq : ?pos:int -> ?len:int -> re -> string -> Group.t Seq.t
  • deprecated Use Seq.all
val matches : ?pos:int -> ?len:int -> re -> string -> string list
val matches_gen : ?pos:int -> ?len:int -> re -> string -> string gen
  • deprecated Use Seq.matches
val matches_seq : ?pos:int -> ?len:int -> re -> string -> string Seq.t
  • deprecated Use Seq.matches
val split : ?pos:int -> ?len:int -> re -> string -> string list
val split_delim : ?pos:int -> ?len:int -> re -> string -> string list
val split_gen : ?pos:int -> ?len:int -> re -> string -> string gen
  • deprecated Use Seq.split
val split_seq : ?pos:int -> ?len:int -> re -> string -> string Seq.t
  • deprecated Use Seq.split
val split_full : ?pos:int -> ?len:int -> re -> string -> split_token list
val split_full_gen : ?pos:int -> ?len:int -> re -> string -> split_token gen
  • deprecated Use Seq.split_full
val split_full_seq : ?pos:int -> ?len:int -> re -> string -> split_token Seq.t
  • deprecated Use Seq.split_full
module Seq : sig ... end
val str : string -> t
val char : char -> t
val alt : t list -> t
val seq : t list -> t
val empty : t
val epsilon : t
val rep : t -> t
val rep1 : t -> t
val repn : t -> int -> int option -> t
val opt : t -> t
val bol : t
val eol : t
val bow : t
val eow : t
val bos : t
val eos : t
val leol : t
val start : t
val stop : t
val word : t -> t
val not_boundary : t
val whole_string : t -> t
val longest : t -> t
val shortest : t -> t
val first : t -> t
val greedy : t -> t
val non_greedy : t -> t
val group : ?name:string -> t -> t
val no_group : t -> t
val nest : t -> t
val mark : t -> Mark.t * t
val set : string -> t
val rg : char -> char -> t
val inter : t list -> t
val diff : t -> t -> t
val compl : t list -> t
val any : t
val notnl : t
val alnum : t
val wordc : t
val alpha : t
val ascii : t
val blank : t
val cntrl : t
val digit : t
val graph : t
val lower : t
val print : t
val punct : t
val space : t
val upper : t
val xdigit : t
val case : t -> t
val no_case : t -> t
val pp : Format.formatter -> t -> unit
val pp_re : Format.formatter -> re -> unit
val print_re : Format.formatter -> re -> unit
val witness : t -> string
type substrings = Group.t
  • deprecated Use Group.t
val get : Group.t -> int -> string
  • deprecated Use Group.get
val get_ofs : Group.t -> int -> int * int
  • deprecated Use Group.offset
val get_all : Group.t -> string array
  • deprecated Use Group.all
val get_all_ofs : Group.t -> (int * int) array
  • deprecated Use Group.all_offset
val test : Group.t -> int -> bool
  • deprecated Use Group.test
type markid = Mark.t
  • deprecated Use Mark.
val marked : Group.t -> Mark.t -> bool
  • deprecated Use Mark.test
val mark_set : Group.t -> Mark.Set.t
  • deprecated Use Mark.all
val replace : ?pos:int -> ?len:int -> ?all:bool -> Re__.Compile.re -> f:(Re__.Group.t -> string) -> string -> string
val replace_string : ?pos:int -> ?len:int -> ?all:bool -> Re__.Compile.re -> by:string -> string -> string
module View : sig ... end
module Emacs : sig ... end
module Glob : sig ... end
module Perl : sig ... end
module Pcre : sig ... end
module Posix : sig ... end
module Str : sig ... end