Regex positional capture in map

Francis Daly francis at
Mon Nov 3 23:04:36 UTC 2014

On Mon, Nov 03, 2014 at 03:03:22PM +0100, B.R. wrote:

Hi there,

I think this is a documentation bug.

> map's documentation
> <> states:
> A regular expression can contain named and positional captures that can
> later be used in other directives along with the resulting variable.

Strictly, those words are true -- you *can* use the named or positional
captures in other directives. It does not say that you can use them in
this same directive. (Or at least, it is possible to read it that way,
if you really wanted to.)

But practically, it should state that the resulting value can be a string,
or can be a variable or a named capture, but cannot be a positional
capture. (Or whatever the actual restrictions are.)

Francis Daly        francis at

More information about the nginx mailing list