Achieving http redirection using regex matching

Hi,
I just want to know if there is a possibility to achieve the following in haproxy.
I have a few routes that I have stored in a map file.
Based on the regex matching , if it matches a specific route I want to redirect to another route.
Example::
route_map.map
So these numbers can be any numbers…so basically match a regex, get the id, and give the corresponding output with the id.
/abc/tickets/1 —> /a/tickets/1
/def/users/20 —> /a/users/20

I would like to achieve this.Tried using map_regm function.But could not find any example.

http-request redirect code 302 location %[path,map_regm(/route_map.map)]

Thankyou.