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
    (*

    Exactly s matches exactly the string s (e.g., '.' only matches '.')

    *)
  3. | One_or_more of t
  4. | Or of t list
  5. | Pattern of string
    (*

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

    *)
  6. | Point
    (*

    Matches zero characters, but only where the point is.

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

    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.

    *)
  10. | Submatch_n of {
    1. index : int;
    2. t : 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.

    *)
  11. | Zero_or_more of t
  12. | Zero_or_one of t
val sexp_of_t : t -> Sexplib0.Sexp.t
val pattern : t -> string