From: Paul Lutus Date: 2006-09-17T01:51:04+09:00 Subject: Re: No regex backreference with four backslashes gabriel.birke@gmail.com wrote: / ... > After thinking a while about it I realized this is not correct. > > Backslashes in a replacement string *must* be double backslashes (four > backslashes in the literal string) because otherwise they would be > interpreted as escaped characters by the regex engine. Right? Yes, if the backslashes are followed by anything other than another backslash (a backslash used as an escape must be followed by a target character other than another backslash). This is why it's a good idea to print the string you intend to use. Printing the string forces it to be parsed, so you can see what you are getting into. -- Paul Lutus http://www.arachnoid.com