
15 Mar
2007
15 Mar
'07
1:20 p.m.
Pavol Droba wrote:
The only solution that I can comeup with is to run replace_all_regex twice. Once for #f pattern and the other time for the #g pattern.
If you use format_literal, it is obvious, that (?1 and (?2 format specifiers are not evaluated.
Maybe there is another solution for this, but I don't know about it.
Exactly, either the string contains format specifiers or it doesn't :-) You would have to: In each replacement string, escape all occurances of "[()$\\]" with \\$0, then join the modified replacement strings together using (?1) etc to create the format string. John.