Extract regx group in haproxy

Hi,
I would like to extract the regx group( want to extract only numerical value) from url and stored it in variable.
For example :
Url be : www.example.com/somesting/somestring/abc-123
Here abc is fixed. Here value after abc-123 will change it could be anything.
But I want to fetch value after abc-

Here is my regx : ^([^?]+).?(abc)-(\d)
here \3 is 123
I want to store that value in some other variable. How can I achieve that in haproxy confiuration ??

Thanks

Hello,

We use to set custom header with something similar :

http-request set-header X-CUSTOM %[capture.req.uri,lower,regsub(^\"([^?]+).?\"\"(abc)\"-\"(\d)\",\"\3\")]

Maybe you have to check the regex as it seems to capture even if \3 is not matching \d