package ecaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Char_class : sig ... end
module Start_or_end : sig ... end
type t =
  1. | Any_char
  2. | Exactly of string
  3. | One_or_more of t
  4. | Or of t list
    (*

    Pattern s interprets s as a regexp (e.g., '.' matches any character)

    *)
  5. | Pattern of string
    (*

    Matches zero characters, but only where the point is.

    *)
  6. | Point
  7. | Repeat of {
    1. min : int;
    2. max : int option;
    3. t : t;
    }
  8. | Seq of t list
    (*

    Text matched by Submatch can be retrieved using Regexp.Last_match.text_exn ~subexp:index.

    index is the number of parentheses to the left of this submatch in the regexp pattern.

    *)
  9. | Submatch of t
    (*

    Text matched by Submatch_n can be retrieved using Regexp.Last_match.text_exn ~subexp:index.

    index must be at least the number of parentheses left of this submatch in the regexp pattern. If index is greater, it will shadow the submatch that would have been assigned that index. If index is less, then it is an error to use the resulting regexp.

    *)
  10. | Submatch_n of {
    1. index : int;
    2. t : t;
    }
  11. | Zero_or_more of t
  12. | Zero_or_one of t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val pattern : t -> string
OCaml

Innovation. Community. Security.