ppx_regexp

AuthorPetter A. Urkedal <paurkedal@gmail.com>
LicenseLGPL-3 with OCaml linking exception
Homepagehttps://github.com/paurkedal/ppx_regexp
Issue Trackerhttps://github.com/paurkedal/ppx_regexp/issues
Maintainerpaurkedal@gmail.com
Dependencies
&jbuilder
ocaml-migrate-parsetree
ppx_tools
re
topkg-jbuilder
Availableocaml-version >= "4.02.3" & ocaml-version < "4.03.0"
PublishedJun 4, 2017
Source [http] https://github.com/paurkedal/ppx_regexp/releases/download/v0.2.0/ppx_regexp-0.2.0.tbz
3df1f48407d5bd361e647817841eb99b
StatisticsInstalled 2 times last month.
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/ppx_regexp/ppx_regexp.0.2.0/opam

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.

No package is dependent