Hello everyone,
I'm using regexp function in my trigger and can't understand behavior of regular expressions in zabbix. Wiki clearly says, that Zabbix supports POSIX extended regexps, but can I use character class names like in perl?
I've created regexp:

And Result is TRUE, so I guess regexp working on test string. However, it doesn't work in trigger with regexp function
Ok, I've used POSIX character classes:

Result also is TRUE and now trigger working correctly.
So, if I can't use char class names like in perl, why I didn't get any warning, when created first regex? Is it a bug or a feature?
Thanks!
I'm using regexp function in my trigger and can't understand behavior of regular expressions in zabbix. Wiki clearly says, that Zabbix supports POSIX extended regexps, but can I use character class names like in perl?
I've created regexp:
Code:
^sent:\s\d+;\sskipped:\s\d+;\stotal:\s\d+$

And Result is TRUE, so I guess regexp working on test string. However, it doesn't work in trigger with regexp function
Ok, I've used POSIX character classes:
Code:
^sent:[[:space:]][[:digit:]]+;[[:space:]]skipped:[[:space:]][[:digit:]]+;[[:space:]]total:[[:space:]][[:digit:]]+$

Result also is TRUE and now trigger working correctly.
So, if I can't use char class names like in perl, why I didn't get any warning, when created first regex? Is it a bug or a feature?
Thanks!
Comment