Skip to content

Commit b2df586

Browse files
committed
update opam, README
1 parent 0cf9a72 commit b2df586

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,13 @@ The patterns are plain strings of the form accepted by `Re.Pcre`, with the follo
110110
the whole pattern matches, and `string option` if the variable is bound
111111
to or nested below an optionally matched group.
112112

113-
- `(N?<var>)` gets substituted by the value of the globally defined string variable named `var`,
113+
- `(?&var)` refers to any identifier bound to a typed regular expression of type `'a Re.t`
114114
and binds whatever it matches as `var`.
115115
The type of `var` will be the same as `(?<var>...)`.
116116

117-
- `(N?<var as name>)` gets substituted by the value of the globally defined string variable named `var`,
118-
and binds whatever it matches as `name`.
117+
- `(?&name:var>)` same as above but binds whatever it matches as `name`. (shortcut for `(?<v>(?&qname))`)
119118
The type of `name` will be the same as `(?<var>...)`.
120119

121-
- `(U?<var>)` gets substituted by the value of the globally defined string variable named `var`,
122-
and does not bind its match to any name.
123-
124120
- `?<var>` at the start of a pattern binds group 0 as `var : string`.
125121
This may not be the full string if the pattern is unanchored.
126122

ppx_regexp_extended.opam

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ below an optionally matched group.
4040

4141
Additional extensions:
4242

43-
- `(?N<var>)` and `(?N<var as name>)` provide named substitution, and make the
43+
- `(?&var)` and `(?&name:var)` provide named substitution, and make the
4444
matched substring available in the right-hand side of match cases
45-
- `(?U<var>)` marks groups whose substrings are not needed in the right-hand side
4645
- `let%pcre name = {|re|}` defines reusable patterns for use within `(?U/N<name>)` patterns
4746
- `match%mikmatch` supports mikmatch-style syntax with typed captures and pattern
4847
composition, along with `let%mikmatch` for defining reusable patterns

0 commit comments

Comments
 (0)