regexp-replace part could use some improvement
Duy Nguyen 05 Aug 2019 12:34 UTC
'subst' argument is described like this:
> subst can be a string, an integer or symbol indicating the contents of a numbered or named submatch of re, 'pre for the substring to the left of the match, or 'post for the substring to the right of the match.
what's missing is, 'subst' can also be a list of these symbols,
numbers or strings. I thought regexp-replace was very limited (if it
only supported either int, sym or str), but this makes it much better.
Chibi test suite does test this case.
Corner case: does 'subst' accept nested lists?
The user also cannot name capture groups 'pre' and 'post' if they want
to use them to replace. But I guess that ship has sailed.
--
Duy