Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4834

Set-var with regex

$
0
0

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

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4834

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>