leslie-tsang commented on code in PR #9112:
URL: https://github.com/apache/apisix/pull/9112#discussion_r1144130026


##########
apisix/core/utils.lua:
##########
@@ -335,4 +335,45 @@ end
 _M.resolve_var = resolve_var
 
 
+local resolve_var_with_captures
+do
+    local _captures
+    -- escape is not supported very well, like there si a redundant '\' after 
escape "$1"
+    local pat = [[ (?<! \\) \$ \{? (\d+) \}? ]]
+
+    local function resolve(m)
+        local v = _captures[tonumber(m[1])]

Review Comment:
   The current implementation meets the needs, seems no need to support the 
capture group name. :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to