move the negation outside of the regular expression for more accurate results

This commit is contained in:
Tony Murray
2016-03-02 23:48:07 -06:00
parent 71d88d6975
commit ea491c4a06

View File

@@ -67,7 +67,7 @@ function process_syslog($entry, $update) {
}
else {
// if this looks like a program (no groups of 2 or more lowercase letters), move it to program
if (preg_match('/[^(a-z)]{2,}/', $entry['msg'])) {
if (!preg_match('/[(a-z)]{2,}/', $entry['msg'])) {
$entry['program'] = $entry['msg'];
unset($entry['msg']);
}