Fix regex in contains filter

pull/925/head
Oleksii Holub 2 years ago
parent 504c3c53cd
commit 9453cac389

@ -20,9 +20,9 @@ internal class ContainsMessageFilter : MessageFilter
!string.IsNullOrWhiteSpace(content) &&
Regex.IsMatch(
content,
@"(?=\b|\s|^)" +
@"(?:\b|\s|^)" +
Regex.Escape(_text) +
@"(?=\b|\s|$)",
@"(?:\b|\s|$)",
RegexOptions.IgnoreCase | RegexOptions.CultureInvariant
);

Loading…
Cancel
Save