]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: sample: Extend functionality for field/word converters
authorMarcin Deranek <marcin.deranek@booking.com>
Mon, 16 Apr 2018 12:30:46 +0000 (14:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Apr 2018 09:27:48 +0000 (11:27 +0200)
commit9631a28275b7c04f441f7d1c3706a765586844e7
treef976ac63ecbfe6d0b52a8babd99712010a854c97
parent9a4da683a6a0ce312c7e302245d6e327858d7ee8
MEDIUM: sample: Extend functionality for field/word converters

Extend functionality of field/word converters, so it's possible
to extract field(s)/word(s) counting from the beginning/end and/or
extract multiple fields/words (including separators) eg.

str(f1_f2_f3__f5),field(2,_,2)  # f2_f3
str(f1_f2_f3__f5),field(2,_,0)  # f2_f3__f5
str(f1_f2_f3__f5),field(-2,_,3) # f2_f3_
str(f1_f2_f3__f5),field(-3,_,0) # f1_f2_f3

str(w1_w2_w3___w4),word(3,_,2)  # w3___w4
str(w1_w2_w3___w4),word(2,_,0)  # w2_w3___w4
str(w1_w2_w3___w4),word(-2,_,3) # w1_w2_w3
str(w1_w2_w3___w4),word(-3,_,0) # w1_w2

Change is backward compatible.
doc/configuration.txt
src/sample.c