You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dunst currently uses fnmatch(3) for pattern matching in filtering rules. It supports wildcard matching ("*") and on GNU systems you can enable some extended patterns like @(one|two|three) for matching any of a few strings or !(one|two|three) for not matching a few strings. We currently don't enable these extended patterns. It was enabled in #659, but it was decided that fnmatch is not a good solution. The man page also says that it's meant for matching file names, not generic strings.
Compatibility: supporting full regex might pose some minor compatibility problems as non-special characters might become special characters. If that is deemed a problem, a toggle can be implemented for enabling regex matching.
The main compatibility problem I see is the wildcard needs a character before it to repeat, so instead of * you need to use .*. So I think we need a switch to turn on this regex search for compatibility.
I've chosen the extended syntax, since it only has a few more special characters and you won't need to backlash things like | for matching multiple strings.
Dunst currently uses
fnmatch(3)
for pattern matching in filtering rules. It supports wildcard matching ("*") and on GNU systems you can enable some extended patterns like@(one|two|three)
for matching any of a few strings or!(one|two|three)
for not matching a few strings. We currently don't enable these extended patterns. It was enabled in #659, but it was decided thatfnmatch
is not a good solution. The man page also says that it's meant for matching file names, not generic strings.Compatibility: supporting full regex might pose some minor compatibility problems as non-special characters might become special characters. If that is deemed a problem, a toggle can be implemented for enabling regex matching.
Fixes: #1013
Fixes: #645
Fixes: #658
Related: #659
The text was updated successfully, but these errors were encountered: