Set-var with regex

Hello,
i want to regsub but i have error
my req.body:
val1:test1,valx:testx,val3:test3

i want to have only valx:testx in my variable:
http-request set-var(txn.myvar) “%[req.body,regsub(‘.+(?<=test1,)(.+)(,val3.+)’,\1,‘g’)]”
i have an error

if i create header:
http-request add-headed myheader “%[req.body,regsub(‘.+(?<=test1,)(.+)(,val3.+)’,\1,‘g’)]”
it’s working

I would like to store variable with the regsub, it is possible

Haproxy 2.6