Hi, 
probably it is a question to developers:

Backrefs work fine in the search string, but do not work in replace string.

Example1 
(in replace - does not work):

new RE( "(..)ple").subst ( "Apple is tasty", "\\1ricot");
Returns:             "\1ricot is tasty"
My expectation:   "Apricot is tasty"


Example2 
(in search - does work):
new RE( "(.)=\\1").subst ( "0=0 is correct", "1=1");
Returns:             "1=1 is correct"

Regards,
Val Starovoitov.

Reply via email to