Skip to content

Commit 2a84b61

Browse files
xeioexy82
authored andcommitted
Documented regexp capture access for njs variables.
1 parent 330bf3e commit 2a84b61

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

xml/en/docs/njs/reference.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<article name="Reference"
1010
link="/en/docs/njs/reference.html"
1111
lang="en"
12-
rev="124">
12+
rev="125">
1313

1414
<section id="summary">
1515

@@ -669,6 +669,15 @@ one of the following syntax can be used:
669669
r.variables['foo']
670670
r.variables.foo
671671
</example>
672+
Since <link doc="changes.xml" id="njs0.8.6">0.8.6</link>,
673+
regular expression captures can be accessed using the following syntax:
674+
<example>
675+
r.variables['1']
676+
r.variables[1]
677+
</example>
678+
</para>
679+
680+
<para>
672681
nginx treats variables referenced in <literal>nginx.conf</literal>
673682
and unreferenced variables differently.
674683
When a variable is referenced, it may be cacheable,

0 commit comments

Comments
 (0)