Subject: | replace vmethod should support braced capture variables (e.g. ${1}) |
Currently there's no way to express something like the following with
TT2's replace vmethod:
s/(...)/${1}012/;
One could try to write
text.replace('(...)', '$1' _ '012')
but this does not work because the 2nd argument is completely
evaluated first and then passed to the replace vmethod. So the vmethod
just sees
'$1012'
as 2nd argument, which is obviously wrong.
A workaround for this problem could be the introduction of "braced"
capture variables. So one could write instead:
text.replace('(...)', '${1}' _ '012')
or even
text.replace('(...)', '${1}012')
I can provide a patch if this is accepted.
Regards,
Slaven