song/StringFilter: support regular expressions with "=~" and "!~"

This feature requires `libpcre`.
This commit is contained in:
Max Kellermann
2018-11-07 00:28:15 +01:00
parent fee75dc766
commit 72184dccfc
13 changed files with 294 additions and 1 deletions

View File

@@ -31,6 +31,11 @@ StringFilter::MatchWithoutNegation(const char *s) const noexcept
assert(s != nullptr);
#endif
#ifdef HAVE_PCRE
if (regex)
return regex->Match(s);
#endif
if (fold_case) {
return substring
? fold_case.IsIn(s)