Module Ecaml__.Regexp
include Ecaml__.Import.Value.Subtype
type valuetype t= private valueWe expose
private valuefor free identity conversions when the value is nested in some covariant type, e.g.(symbols : Symbol.t list :> Value.t list)rather thanList.map symbols ~f:Symbol.to_value.
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val eq : t -> t -> booleq t1 t2 = Value.eq (to_value t1) (to_value t2), i.e.eqchecks whether the Emacs values underlyingt1andt2are physically equal. This is different thanphys_equal t1 t2, because we don't always wrapeqEmacs values inphys_equalOCaml values. I.e.phys_equal t1 t2implieseq t1 t2, but not the converse.
val is_in_subtype : value -> bool
include Ecaml_value__.Valueable0.S with type t := t
val of_value_exn : Ecaml_value__.Value0.t -> tval to_value : t -> Ecaml_value__.Value0.tval type_ : t type_val t : t type_
val of_rx : Ecaml.Rx.t -> tRx.tis the preferred way to construct regexps, especially when the alternative involves string manipulation in OCaml.
val match_anything : tval match_nothing : tval of_pattern : string -> t(Info-goto-node "(elisp)Syntax of Regexps")
val to_pattern : t -> stringval any : t list -> tval any_pattern : string list -> tval quote : string -> tquote stringmatchesstringand nothing else.(describe-function 'regexp-quote)(Info-goto-node "(elisp)Regexp Functions")
val any_quote : string list -> tany_quote stringsmatches every string instrings, and nothing else.(describe-function 'regexp-opt)(Info-goto-node "(elisp)Regexp Functions")
module Last_match : sig ... endSupplying
~update_last_match:trueto a searching function causes Emacs to keep track of the "last match", i.e. the start and end positions of the segments of text found during the search. One can access parts of the last match via theLast_matchfunctions.subexpis one based.(Info-goto-node "(elisp)Match Data")
val match_ : ?start:int -> ?update_last_match:bool -> t -> Ecaml.Text.t -> int optionmatch_ t textfinds the first match oftintext, returns the index of the start of the match.(describe-function 'string-match)(describe-function 'string-match-p)(Info-goto-node "(elisp)Regexp Search")
val does_match : ?start:int -> ?update_last_match:bool -> t -> Ecaml.Text.t -> booldoes_match t textisis_some (match_ t text)
val extract : ?start:int -> ?subexp:int -> t -> Ecaml.Text.t -> string optionval extract_string : ?start:int -> ?subexp:int -> t -> string -> string optionval replace : t -> with_:Ecaml.Text.t -> in_:Ecaml.Text.t -> Ecaml.Text.t(describe-function 'replace-regexp-in-string)
val replace_string : t -> with_:string -> in_:string -> stringval save_match_data : (_, 'a) Ecaml.Sync_or_async.t -> (unit -> 'a) -> 'a(describe-function 'save-match-data)