https://bugs.exim.org/show_bug.cgi?id=1679

--- Comment #4 from Philip Hazel <p...@hermes.cam.ac.uk> ---
Currently, pcre2_substitute() gives access only to captured substrings in the
replacement string. It would be possible to allow it to access the MARK string,
in which case you could do something similar to Perl. The syntax ${*mark}
(which currently causes an error) could be used. Only one MARK name is
available, of course. In pcre2test you could then write 

/(*MARK:pear)apple|(*MARK:strawberry)cherry/g,replace=${*mark}

for example. This would be implemented by calling pcre2_substitute() with the
PCRE2_SUBSTITUTE_GLOBAL option. The code for this should be straighforward and
might be generally useful, so I'll implement it and see how it feels.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to