[collectd] backreferences in replace target

2013-02-20 Thread Kimo Rosenbaum
Hello, Is it possible to use backreferences in a replace target? ie:   Host "foo-\(bar\).baz.com" "\1" None of these seem to work, given a host of foo-bar.baz.com and I want bar.baz.com: Host "^[a-z0-9-]+-([a-z0-9]+)" "\1" -> 1.baz.com Host "^[a-z0-9-]+-([a-z0-9]+)" "\\1" -> \1.baz.com

Re: [collectd] backreferences in replace target

2013-02-20 Thread Kimo Rosenbaum
sday, February 20, 2013 4:07 PM > Subject: [collectd] backreferences in replace target > > > > Hello, > > Is it possible to use backreferences in a replace target? ie: > > > >   Host "foo-\(bar\).baz.com" "\1" > > > None of these seem to

Re: [collectd] backreferences in replace target

2013-02-20 Thread Florian Forster
Hi Kimo, On Wed, Feb 20, 2013 at 04:07:03PM -0800, Kimo Rosenbaum wrote: > Is it possible to use backreferences in a replace target? ie: no, this is currently not possible. I guess it would be pretty straight forward to iterate over the "pmatch" array filled by regexec() and use the utility funct