MCPcopy Create free account
hub / github.com/apache/httpd / ap_expr_eval_re_backref

Function ap_expr_eval_re_backref

server/util_expr_eval.c:193–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx, unsigned int n)
194{
195 int len;
196
197 if (!ctx->re_pmatch || !ctx->re_source || !*ctx->re_source
198 || **ctx->re_source == '\0' || ctx->re_nmatch < n + 1)
199 return "";
200
201 len = ctx->re_pmatch[n].rm_eo - ctx->re_pmatch[n].rm_so;
202 if (len == 0)
203 return "";
204
205 return apr_pstrndup(ctx->p, *ctx->re_source + ctx->re_pmatch[n].rm_so, len);
206}
207
208static const char *ap_expr_eval_string_func(ap_expr_eval_ctx_t *ctx,
209 const ap_expr_t *info,

Callers 1

ap_expr_eval_wordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected