regex: fix counter of matching captures
@@ -128,7 +128,7 @@ ssize_t flb_regex_do(struct flb_regex *r, unsigned char *str, size_t slen,
result->region = region;
result->str = str;
- return region->num_regs;
+ return (region->num_regs - 1);
}
int flb_regex_parse(struct flb_regex *r, struct flb_regex_search *result,
