We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ec4f62 commit 2f8c17eCopy full SHA for 2f8c17e
ppx_regexp.descr
@@ -0,0 +1,16 @@
1
+Matching Regular Expressions with OCaml Patterns
2
+
3
+This syntax extension turns
4
5
+ match%pcre x with
6
+ | {|re1|} -> e1
7
+ ...
8
+ | {|reN|} -> eN
9
+ | _ -> e0
10
11
+into suitable invocations to the ocaml-re library. The patterns are plain
12
+strings of the form accepted by `Re_pcre`, except groups can be bound to
13
+variables using the syntax `(?<var>...)`. The type of `var` will be
14
+`string` if a match is of the groups is guaranteed given a match of the
15
+whole pattern, and `string option` if the variable is bound to or nested
16
+below an optionally matched group.
0 commit comments