package pcre

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type error =
  1. | Partial
  2. | BadPartial
  3. | BadPattern of string * int
  4. | BadUTF8
  5. | BadUTF8Offset
  6. | MatchLimit
  7. | RecursionLimit
  8. | InternalError of string
exception Error of error
exception Backtrack
exception Regexp_or of string * error
type icflag
and irflag
and cflag = [
  1. | `ANCHORED
  2. | `AUTO_CALLOUT
  3. | `CASELESS
  4. | `DOLLAR_ENDONLY
  5. | `DOTALL
  6. | `EXTENDED
  7. | `EXTRA
  8. | `FIRSTLINE
  9. | `MULTILINE
  10. | `NO_AUTO_CAPTURE
  11. | `NO_UTF8_CHECK
  12. | `UNGREEDY
  13. | `UTF8
]
val cflags : cflag list -> icflag
val cflag_list : icflag -> cflag list
type rflag = [
  1. | `ANCHORED
  2. | `NOTBOL
  3. | `NOTEMPTY
  4. | `NOTEOL
  5. | `PARTIAL
]
val rflags : rflag list -> irflag
val rflag_list : irflag -> rflag list
val version : string
val config_utf8 : bool
val config_newline : char
val config_match_limit : int
val config_match_limit_recursion : int
val config_stackrecurse : bool
type firstbyte_info = [
  1. | `ANCHORED
  2. | `Char of char
  3. | `Start_only
]
type study_stat = [
  1. | `Not_studied
  2. | `Optimal
  3. | `Studied
]
type regexp
val options : regexp -> icflag
val size : regexp -> int
val studysize : regexp -> int
val capturecount : regexp -> int
val backrefmax : regexp -> int
val namecount : regexp -> int
val names : regexp -> string array
val nameentrysize : regexp -> int
val firstbyte : regexp -> firstbyte_info
val firsttable : regexp -> string option
val lastliteral : regexp -> char option
val study_stat : regexp -> study_stat
val get_stringnumber : regexp -> string -> int
val get_match_limit : regexp -> int option
val get_match_limit_recursion : regexp -> int option
type chtables
val maketables : unit -> chtables
val regexp : ?study:bool -> ?limit:int -> ?limit_recursion:int -> ?iflags:icflag -> ?flags:cflag list -> ?chtables:chtables -> string -> regexp
val regexp_or : ?study:bool -> ?limit:int -> ?limit_recursion:int -> ?iflags:icflag -> ?flags:cflag list -> ?chtables:chtables -> string list -> regexp
val quote : string -> string
type substrings
val get_subject : substrings -> string
val num_of_subs : substrings -> int
val get_substring : substrings -> int -> string
val get_substring_ofs : substrings -> int -> int * int
val get_substrings : ?full_match:bool -> substrings -> string array
val get_opt_substrings : ?full_match:bool -> substrings -> string option array
val get_named_substring : regexp -> string -> substrings -> string
val get_named_substring_ofs : regexp -> string -> substrings -> int * int
type callout_data = {
  1. callout_number : int;
  2. substrings : substrings;
  3. start_match : int;
  4. current_position : int;
  5. capture_top : int;
  6. capture_last : int;
  7. pattern_position : int;
  8. next_item_length : int;
}
type callout = callout_data -> unit
val pcre_exec : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?callout:callout -> string -> int array
val exec : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?callout:callout -> string -> substrings
val exec_all : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?callout:callout -> string -> substrings array
val next_match : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?callout:callout -> substrings -> substrings
val extract : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?full_match:bool -> ?callout:callout -> string -> string array
val extract_opt : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?full_match:bool -> ?callout:callout -> string -> string option array
val extract_all : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?full_match:bool -> ?callout:callout -> string -> string array array
val extract_all_opt : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?full_match:bool -> ?callout:callout -> string -> string option array array
val pmatch : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?callout:callout -> string -> bool
type substitution
val subst : string -> substitution
val replace : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?itempl:substitution -> ?templ:string -> ?callout:callout -> string -> string
val qreplace : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?templ:string -> ?callout:callout -> string -> string
val substitute_substrings : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?callout:callout -> subst:(substrings -> string) -> string -> string
val substitute : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?callout:callout -> subst:(string -> string) -> string -> string
val replace_first : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?itempl:substitution -> ?templ:string -> ?callout:callout -> string -> string
val qreplace_first : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?templ:string -> ?callout:callout -> string -> string
val substitute_substrings_first : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?callout:callout -> subst:(substrings -> string) -> string -> string
val substitute_first : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?callout:callout -> subst:(string -> string) -> string -> string
val split : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?max:int -> ?callout:callout -> string -> string list
val asplit : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?max:int -> ?callout:callout -> string -> string array
type split_result =
  1. | Text of string
  2. | Delim of string
  3. | Group of int * string
  4. | NoGroup
val full_split : ?iflags:irflag -> ?flags:rflag list -> ?rex:regexp -> ?pat:string -> ?pos:int -> ?max:int -> ?callout:callout -> string -> split_result list
val foreach_line : ?ic:Pervasives.in_channel -> (string -> unit) -> unit
val foreach_file : string list -> (string -> Pervasives.in_channel -> unit) -> unit
val unsafe_pcre_exec : irflag -> regexp -> pos:int -> subj_start:int -> subj:string -> subgroups2:int -> int array -> callout option -> unit
val make_ovector : regexp -> int * int array
OCaml

Innovation. Community. Security.