| 191 | } |
| 192 | |
| 193 | static 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 | |
| 208 | static const char *ap_expr_eval_string_func(ap_expr_eval_ctx_t *ctx, |
| 209 | const ap_expr_t *info, |