Is there any way of capturing variables in V3 as it was in V2?

I’m trying to do something like this:

http:
  routers:
    qa-router:
      rule: "HostRegexp(`{subdomain:[a-z0-9-]+}.qa.example.com`)"
      entryPoints:
        - websecure
      service: qa-service
      middlewares:
        - qa-rewrite-host
      tls: {}

    services:
      qa-service:
        loadBalancer:
          servers:
            - url: "https://192.168.1.10"

    middlewares:
     qa-rewrite-host:
       headers:
         customRequestHeaders:
           Host: "{subdomain}.example.com"

It would capture the variable subdomain to be used later.

Is there any way of doing a similar job in V3?

Regex has changed with v3 (doc):

HeaderRegexp , HostRegexp , PathRegexp , QueryRegexp , and HostSNIRegexp matchers now uses the Go regexp syntax.