Re: Replacing with backrefs does not work, can anybody explain why?

Schamil Wackenhut <[email protected]> Thu, 05 Jun 2003 10:41:01 +0200
Newsgroups gmane.comp.jakarta.regexp.user
Message-ID <20030605084101.GA138@fuckup>
* Val Starovoitov meinte:

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

Try \1ricot. The problem is you escape the second backslash
instead of 1.
-- 
/earth: file system full.