File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,23 @@ function%pcre
26
26
into suitable invocations of the [ Re library] [ re ] , and similar for
27
27
` match%pcre ` . The patterns are plain strings of the form accepted by
28
28
` Re_pcre ` , with the following additions:
29
-
29
+
30
30
- ` (?<var>...) ` defines a group and binds whatever it matches as ` var ` .
31
31
The type of ` var ` will be ` string ` if the match is guaranteed given that
32
32
the whole pattern matches, and ` string option ` if the variable is bound
33
33
to or nested below an optionally matched group.
34
34
35
+ - ` (N?<var>) ` gets substituted by the value of the ` %pcre ` extended string variable named ` var ` ,
36
+ and binds whatever it matches as ` var ` .
37
+ The type of ` var ` will be the same as ` (?<var>...) ` .
38
+
39
+ - ` (N?<var as name>) ` gets substituted by the value of the ` %pcre ` extended string variable named ` var ` ,
40
+ and binds whatever it matches as ` name ` .
41
+ The type of ` name ` will be the same as ` (?<var>...) ` .
42
+
43
+ - ` (U?<var>) ` gets substituted by the value of the globally defined string variable named ` var ` ,
44
+ and does not bind its match to any name.
45
+
35
46
- ` ?<var> ` at the start of a pattern binds group 0 as ` var : string ` .
36
47
This may not be the full string if the pattern is unanchored.
37
48
You can’t perform that action at this time.
0 commit comments