static int regexp_sub2(const char *string, const char *pattern, const char *output_template, int flags, char **out,
#error "cannot use both pcre and pcre2 at the same time!"
#define ZBX_REGEXP_MULTILINE PCRE_MULTILINE
#ifdef PCRE_NO_AUTO_CAPTURE
#define ZBX_REGEXP_NO_AUTO_CAPTURE PCRE_NO_AUTO_CAPTURE
#define ZBX_REGEXP_CASELESS PCRE_CASELESS
#if !defined(HAVE_PCRE_H) && !defined(HAVE_PCRE2_H)
#error "must use pcre or pcre2!"
# define ZBX_REGEXP_MULTILINE PCRE2_MULTILINE
# ifdef PCRE2_NO_AUTO_CAPTURE
# define ZBX_REGEXP_NO_AUTO_CAPTURE PCRE2_NO_AUTO_CAPTURE
# define ZBX_REGEXP_CASELESS PCRE2_CASELESS
# ifdef PCRE2_MATCH_INVALID_UTF
# define ZBX_REGEXP_COMPILE_FLAGS (PCRE2_MATCH_INVALID_UTF | PCRE2_UTF)
# define ZBX_REGEXP_COMPILE_FLAGS (PCRE2_UTF)
struct pcre_extra *extra;
pcre2_code *pcre2_regexp;
pcre2_match_context *match_ctx;
#define ZBX_REGEXP_GROUPS_MAX 10
ZBX_PTR_VECTOR_IMPL(expression, zbx_expression_t *)
zbx_regmatch_t groups[ZBX_REGEXP_GROUPS_MAX];
ZBX_PTR_VECTOR_DECL(match, zbx_match_t *)
ZBX_PTR_VECTOR_IMPL(match, zbx_match_t *)
static void zbx_match_free(zbx_match_t *match)
#if defined(HAVE_PCRE2_H)