This patch fixes the bug where zabbix's regexes are compiled with the REG_NEWLINE flag, causing new line character not to be treated as normal character. This is extremely counterintuitive for we scenarios and generally just plain useless.
Code:
--- zabbix-1.4.4.orig/src/libs/zbxcommon/regexp.c 2007-12-17 13:18:59.000000000 +0000
+++ zabbix-1.4.4/src/libs/zbxcommon/regexp.c 2007-12-20 21:55:00.000000000 +0000
@@ -51,10 +51,10 @@
char *zbx_regexp_match(const char *string, const char *pattern, int *len)
{
- return zbx_regexp(string, pattern, len, REG_EXTENDED | REG_NEWLINE);
+ return zbx_regexp(string, pattern, len, REG_EXTENDED);
}
char *zbx_iregexp_match(const char *string, const char *pattern, int *len)
{
- return zbx_regexp(string, pattern, len, REG_EXTENDED | REG_ICASE | REG_NEWLINE);
+ return zbx_regexp(string, pattern, len, REG_EXTENDED | REG_ICASE);
}