Use REG_EXTENDED for regex matching

The "7 regex" manual page called 'Basic' regular expressions "Obsolete".

It also matches the pcre expressions slightly better.
This commit is contained in:
Robert de Bath 2017-06-18 09:47:34 +01:00
parent 2a7bafdd7f
commit 338daafe87

View File

@ -212,7 +212,7 @@ static void setup_regex_probe(struct proto *p, config_setting_t* probes)
for (i = 0; i < num_probes; i++) {
probe_list[i] = malloc(sizeof(*(probe_list[i])));
expr = config_setting_get_string_elem(probes, i);
res = regcomp(probe_list[i], expr, 0);
res = regcomp(probe_list[i], expr, REG_EXTENDED);
if (res) {
err = malloc(errsize = regerror(res, probe_list[i], NULL, 0));
regerror(res, probe_list[i], err, errsize);