Let regex match newlines

This commit is contained in:
M66B
2019-09-02 21:52:33 +02:00
parent 5ed8c4c522
commit 1777d466f0

View File

@@ -206,7 +206,7 @@ public class EntityRule {
boolean matched = false;
if (needle != null && haystack != null)
if (regex) {
Pattern pattern = Pattern.compile(needle);
Pattern pattern = Pattern.compile(needle, Pattern.DOTALL);
matched = pattern.matcher(haystack).matches();
} else
matched = haystack.toLowerCase().contains(needle.trim().toLowerCase());