Module Ecaml__.Rx
include Ecaml__.Rx_intf.Rx
module Char_class : module type of sig ... end
module Start_or_end : module type of sig ... end
include module type of Ecaml__.Rx_intf.T with type T.t = Ecaml__.Rx_intf.T.t
type t
= Ecaml__.Rx_intf.T.t
=
|
Any_char
|
Any_in of Ecaml__.Rx_intf.Char_class.t list
Exactly s
matches exactly the strings
(e.g., '.' only matches '.')|
Exactly of string
|
Line of Ecaml__.Rx_intf.Start_or_end.t
|
None_in of Ecaml__.Rx_intf.Char_class.t list
|
One_or_more of t
|
Or of t list
Pattern s
interpretss
as a regexp (e.g., '.' matches any character)|
Pattern of string
Matches zero characters, but only where the point is.
|
Point
|
Repeat of
{
min : int;
max : int option;
t : t;
}
|
Seq of t list
Text matched by
Submatch
can be retrieved usingRegexp.Last_match.text_exn ~subexp:index
.index
is the number of parentheses to the left of this submatch in the regexp pattern.|
Submatch of t
Text matched by
Submatch_n
can be retrieved usingRegexp.Last_match.text_exn ~subexp:index
.index
must be at least the number of parentheses left of this submatch in the regexp pattern. Ifindex
is greater, it will shadow the submatch that would have been assigned that index. Ifindex
is less, then it is an error to use the resulting regexp.|
Submatch_n of
{
index : int;
t : t;
}
|
Zero_or_more of t
|
Zero_or_one of t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val pattern : t -> string