From: Peter Hickman Date: 2003-01-27T19:02:35+09:00 Subject: Re: Very nasty piece of code Bulat Ziganshin wrote: > Hello Peter, > > Monday, January 27, 2003, 12:44:41 PM, you wrote: > PH> while string =~ /(&#([0-9a-fA-F]{2});)/ do > PH> # Converting from &#XX; to \'XX > > PH> string.sub!($1, "\\\\\\\''#{$2}") > > smth like > > string.sub! $1 {"\\'#{$2}"} > > or even > > string.sub! $1 {"\\'" . $2} > > 2all: this may go to faq? > > Neither of those actually parse! What version of Ruby are you using.