Re: Reverse String (or get 2nd level domain sample)?

2018-06-29 Thread Jarno Huuskonen
Hi, On Fri, Jun 29, Baptiste wrote: > converters are just simple C functions, (or could be Lua code as well), and > are quite trivial to write. > Instead of creating a converter that reverse the order of chars in a > string, I would rather patch current "word" converter to support negative > integ

Re: Reverse String (or get 2nd level domain sample)?

2018-06-29 Thread Baptiste
Hi, converters are just simple C functions, (or could be Lua code as well), and are quite trivial to write. Instead of creating a converter that reverse the order of chars in a string, I would rather patch current "word" converter to support negative integers. IE: -2 would means you extract the se

Re: Reverse String (or get 2nd level domain sample)?

2018-06-25 Thread Daniel Schneller
Hi again! I found a working config using the map_regm converter. I think it is somewhat overcomplicated for what it is supposed to achieve, but for now it works. Leaving this here for reference: # Remove port numbers from the Host header -- we do not rely on different ports for the same do

Reverse String (or get 2nd level domain sample)?

2018-06-25 Thread Daniel Schneller
Hi! Just double checking to make sure I am not simply blind: Is there a way to reverse a string using a sample converter? Background: I need to extract just the second level domain from the host header. So for sub.sample.example.com I need to fetch "example".