How to add parameters to route using RegEx in Traefik?

I am new to Traefik and I need to add a parameter to the path like follow:


{id} should be a RegEx allowing only valid MongoDB ObjectId. The Regex for it is as follow: ^[0-9a-fA-F]{24}$.

Based on Routers documentation I have tried the following (I am using Docker):

- "traefik.http.routers.ed.rule=Host(``) && PathPrefix(`/apps/{id:[0-9a-fA-F]{24}}/list`)"

But it does not seem to be working since my app is unable to catch a request coming from that path.

What I am missing here?