]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: word converter ignores delimiters at the start or end of input string
authorJerome Magnin <jmagnin@haproxy.com>
Tue, 28 Jan 2020 12:33:44 +0000 (13:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 Jan 2020 12:44:48 +0000 (13:44 +0100)
The comments for match_word() in pattern.c mention that delimiters
at the start or end of the input string will be ignored, but this
is not mentionned in the documentation.

Backport to all supported versions.

doc/configuration.txt

index 89dd4df25129d87102c1d742775477898b57046b..22fa88272d070cf1a23c69dbce3489309cd96e82 100644 (file)
@@ -14170,6 +14170,7 @@ word(<index>,<delimiters>[,<count>])
   Extracts the nth word counting from the beginning (positive index) or from
   the end (negative index) considering given delimiters from an input string.
   Indexes start at 1 or -1 and delimiters are a string formatted list of chars.
+  Delimiters at the beginning or end of the input string are ignored.
   Optionally you can specify <count> of words to extract (default: 1).
   Value of 0 indicates extraction of all remaining words.
 
@@ -14179,6 +14180,7 @@ word(<index>,<delimiters>[,<count>])
       str(f1_f2_f3__f5),word(3,_,2)  # f3__f5
       str(f1_f2_f3__f5),word(-2,_,3) # f1_f2_f3
       str(f1_f2_f3__f5),word(-3,_,0) # f1_f2
+      str(/f1/f2/f3/f4),word(1,/)    # f1
 
 wt6([<avalanche>])
   Hashes a binary input sample into an unsigned 32-bit quantity using the WT6