Module Regexp


module Regexp: sig .. end
executes a match the result is an array of substrings corresponding to matched groups 0 is the whole substring matched by the regexp 1 is the outermost parenthetised group etc.

type t 

type flag =
| Global_search
| Case_insensitive
| Multi_line
val make : string -> string -> t
val last_index : t -> int
val make : ?global:bool ->
?case_insensitive:bool -> ?multi_line:bool -> string -> t
val test : t -> string -> bool
val exec : t -> string -> string array
executes a match the result is an array of substrings corresponding to matched groups 0 is the whole substring matched by the regexp 1 is the outermost parenthetised group etc.
val index : t -> string -> int
returns the index of the first match of the regexp in the string raises Not_found if the string is not matched by the regexp
val replace : t -> string -> string -> string
replace regexp substitution string special chars (doc from MDC):
val replace_fun : t -> (int -> string array -> string) -> string -> string
replace_fun regexp substitution function string the substitution function takes :
val split : t -> string -> string array