1
0
mirror of http://git.haproxy.org/git/haproxy.git/ synced 2025-02-21 21:26:58 +00:00

DOC: fix a confusing typo on a regsub example

S�bastien reported a confusing example in the doc about regsub when used
with quotes. Nested quotes are already not trivial to grasp, but when
typos are there and result in something valid, it's even worse. The closing
quote ought to have been inside the brackets. However haproxy will not make
any difference because the single quotes delimit a word and the delimited
word remains the same. Let's just not add yet another level of confusion.
This commit is contained in:
Willy Tarreau 2020-10-08 18:05:56 +02:00
parent da46c1ca60
commit 465dc7d63f

View File

@ -15476,7 +15476,7 @@ regsub(<regex>,<subst>[,<flags>])
# capture groups and backreferences
# both lines do the same.
http-request redirect location %[url,'regsub("(foo|bar)([0-9]+)?","\2\1",i)]'
http-request redirect location %[url,'regsub("(foo|bar)([0-9]+)?","\2\1",i)']
http-request redirect location %[url,regsub(\"(foo|bar)([0-9]+)?\",\"\2\1\",i)]
capture-req(<id>)