From: Arran Cudbard-Bell Date: Sun, 5 Dec 2021 03:15:45 +0000 (-0500) Subject: Print regex capture groups too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f80a98a0de8bcf728f4b267073ef290191305d4;p=thirdparty%2Ffreeradius-server.git Print regex capture groups too --- diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index ce9ac35f8d5..3fbb5f71236 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -111,7 +111,12 @@ static char *xlat_fmt_aprint(TALLOC_CTX *ctx, xlat_exp_t const *node) return talloc_asprintf(ctx, "%%{%s}", node->fmt); case XLAT_VIRTUAL: - return talloc_asprintf(ctx, "%%{%s}", node->call.func->name);; + return talloc_asprintf(ctx, "%%{%s}", node->call.func->name); + +#ifdef HAVE_REGEX + case XLAT_REGEX: + return talloc_asprintf(ctx, "%%{%u}", node->regex_index); +#endif case XLAT_FUNC: {