nginx httpMapModule regex variables

Solution 1:

(?P<name>pattern) is the standard PCRE syntax for named capture-groups - the documentation is missing a P.

The "Named Subpatterns" section on Wikipedia states that (?<name>...) and (?'name'...) are valid for PCRE 7.0 onwards; presumably your version of nginx is linked against an earlier version of PCRE.