ppx_regexpversion
Matching Regular Expressions with OCaml Patterns
This syntax extension turns
match%pcre x with
| {|re1|} -> e1
...
| {|reN|} -> eN
| _ -> e0
into suitable invocations to the ocaml-re library. The patterns are plain
strings of the form accepted by Re_pcre
, except groups can be bound to
variables using the syntax (?<var>...)
. The type of var
will be
string
if a match is of the groups is guaranteed given a match of the
whole pattern, and string option
if the variable is bound to or nested
below an optionally matched group.
Authors | Petter A. Urkedal <paurkedal@gmail.com> and Gabriel Radanne <drupyog@zoho.com> |
---|---|
License | LGPL-3.0-or-later WITH LGPL-3.0-linking-exception |
Published | |
Homepage | https://github.com/paurkedal/ppx_regexp |
Issue Tracker | https://github.com/paurkedal/ppx_regexp/issues |
Maintainer | Petter A. Urkedal <paurkedal@gmail.com> |
Dependencies | |
Source [http] | https://github.com/paurkedal/ppx_regexp/releases/download/v0.5.1/ppx_regexp-v0.5.1.tbz sha256=25083bc47c6ca224b52d958e3272c938c1115895446ed526ca330f03a2d50ca8 sha512=e9e8888b8f4cf4f7b2aab38af8e835f716a5b973b7a48ae329daafcc80b705bc8f839f6f76364699804903cc7f9ae6d5d69d9cf0f257c007558ff9f0fbf6d357 |
Edit | https://github.com/ocaml/opam-repository/tree/master/packages/ppx_regexp/ppx_regexp.0.5.1/opam |
No package is dependent