Add 'visit'-functionality to TagsFilter, add case invariant regextag

This commit is contained in:
Pieter Vander Vennet 2022-06-07 03:35:55 +02:00
parent e6812f3577
commit ec1c206f84
9 changed files with 131 additions and 69 deletions

View file

@ -57,6 +57,9 @@ Regex equals
A tag can also be tested against a regex with `key~regex`. Note that this regex __must match__ the entire value. If the
value is allowed to appear anywhere as substring, use `key~.*regex.*`
Regexes will match the newline character with `.` too - the `s`-flag is enabled by default.
To enable case invariant matching, use `key~i~regex`
Equivalently, `key!~regex` can be used if you _don't_ want to match the regex in order to appear.
@ -81,13 +84,15 @@ which we do not want.
To mitigate this, use:
```json
"mappings": [
{
"if":"key:={some_other_key}"
"then": "...",
"hideInAnswer": "some_other_key="
"mappings": [
{
"if":"key:={some_other_key}"
"then": "...",
"hideInAnswer": "some_other_key="
}
]
}
]
```
One can use `key!:=prefix-{other_key}-postfix` as well, to match if `key` is _not_ the same