Hi.
I have stumbled across a slightly weird thing in the Zabbix source. In the file "regxp.c":
The REG_NEWLINE flag here is really counterintuitive for web monitoring steps. It essentially means that unless a regex has a "^" in it, it will be limited to single lines.
Then there is that:
However, in zbx_regexp above, we can see that the flags passed by zbx_iregexp_match will be ignored. Essentially, the iregxp function will still be case sensitive. Is there a specific reason for this, or is it a bug?
I have stumbled across a slightly weird thing in the Zabbix source. In the file "regxp.c":
Code:
static char *zbx_regexp(const char *string, const char *pattern, int *len, int flags)
....
if ( 0 == regcomp(&re, pattern, REG_EXTENDED | /* REG_ICASE | */ REG_NEWLINE) )
...
Then there is that:
Code:
char *zbx_iregexp_match(const char *string, const char *pattern, int *len)
{
return zbx_regexp(string, pattern, len, REG_EXTENDED | REG_ICASE | REG_NEWLINE);
}