conf: support ! to negate the match

So that you can do "application.name" = "!pw-cat" to match anything
that is not pw-cat and "application.name" = "!~pw-cat$".

Fixes #3460
This commit is contained in:
Wim Taymans 2023-08-25 11:39:28 +02:00
parent 0bfc02581f
commit 8dd294bf44
5 changed files with 21 additions and 14 deletions

View file

@ -75,7 +75,7 @@
* { matches = [
* # any of the items in matches needs to match, if one does,
* # actions are emited.
* { # all keys must match the value. ~ in value starts regex.
* { # all keys must match the value. ! negates. ~ starts regex.
* #rtp.origin = "wim 3883629975 0 IN IP4 0.0.0.0"
* #rtp.payload = "127"
* #rtp.fmt = "L16/48000/2"
@ -91,7 +91,7 @@
* }
* }
* { matches = [
* { # all keys must match the value. ~ in value starts regex.
* { # all keys must match the value. ! negates. ~ starts regex.
* #rtp.origin = "wim 3883629975 0 IN IP4 0.0.0.0"
* #rtp.payload = "127"
* #rtp.fmt = "L16/48000/2"