ap_pregsub — substitute for regular-expression submatches
char *ap_pregsub(pool *p, const char *input, const char *source, size_t nmatch, regmatch_t pmatch[])
Substitutes for $0-$9
in input
,
using source
as the source of the substitutions
and pmatch
to determine from where to substitute.
nmatch
, pmatch
, and
source
should be the same as passed to
regexec()
. Returns the substituted version of
input
in memory allocated from
p
.