package re

  1. Overview
  2. Docs

Perl-style regular expressions

exception Parse_error
exception Not_supported

Errors that can be raised during the parsing of the regular expression

type opt = [
  1. | `Ungreedy
  2. | `Dotall
  3. | `Dollar_endonly
  4. | `Multiline
  5. | `Anchored
  6. | `Caseless
]
val re : ?opts:opt list -> string -> (Re__.Ast.cset, [ `Cased | `Uncased ]) Re__.Ast.gen

Parsing of a Perl-style regular expression

val compile : (Re__.Ast.cset, [ `Cased | `Uncased ]) Re__.Ast.gen -> Re__.Compile.re

(Same as Re.compile)

val compile_pat : ?opts:opt list -> string -> Re__.Compile.re

Regular expression compilation

OCaml

Innovation. Community. Security.