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

How to use "]" in a regsub converter inside a log format

$
0
0

@lucid_thayne wrote:

I want to have something like this:

http-request set-path %[path,regsub(/prefix/([a-zA-Z0-9]+), /newprefix/\1)] if { path -m beg /prefix }

However, I get an errror, because haproxy interprets the first “]” as the end of the fetch for “%[” instead of part of the regular expression.

I’ve tried to quote the whole regex, and to escape the ] with a backslash, but neither seem to work.

Using haproxy 1.8.20

Posts: 6

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4720

Trending Articles



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