Capture path regex wildcard to use in namespace

Hi,

I would like to capture path wildcard regex and use the capture in namespace...
For example, /path/abc/... to route to namespace 'abc', service: web-server, i.e. web-server.abc. Generalized, this would be /path/(.*) to web-server.$1 if using the $1 for first regex capture group. There are potentially more complex scenarios, i.e. multiple capture groups.

Is this possible ?
Thanks ahead

From what I have seen and tried , regex replace will work only on the path it self .

      replacePathRegex:
        regex: "^/path/(.*)"
        replacement: "/$1"

I have tried to achieve something similar to your in past and found out that it was not possible.

In order to achieve what you want , I guess you will need to know all the (.*) in advance, in order to have them templated at your service: values.
I guess if its not something that getting spinned-up on the go , you can achieve it by templating your yamls.