From 465dc7d63f99e94a904adb0e04504bf7e940536b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 8 Oct 2020 18:05:56 +0200 Subject: [PATCH] DOC: fix a confusing typo on a regsub example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- doc/configuration.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 3054b1c7f..3b14e83a1 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -15476,7 +15476,7 @@ regsub(,[,]) # 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()