While trying to use lookahead in a regex in my TICKScript i get an error:
"Error parsing regexp: invalid or unsupported Perl syntax: '(?!'.
I'm using Kapcitor 1.0.0
TICKScript:
stream
|from()
.measurment('SendSucessCounter$')
|Where(lamba: "server_name" = 'MyServer' AND "path" =~ /^\.(?:(?!Hey|Hello)[^\.]+)\.Output\.SendSucessCounter)
|alert()
.id(MyServer_SendSuccessCounter)
.info(lamba: ("value" = 0) OR ("value" > 0))
.crit(lamba: ("value" = 0))
.post('http://TestUrl:8080/Kapacitor')
Is there any other way i could do a negative lookahead kind of thing, or maybe is there a way to enable it?
Lookahead assertions are not supported by Kapacitor, since they are not supported by Go's regexp library. You can find all supported syntax here.