From: ridcully Date: 2007-11-17T20:30:00+09:00 Subject: Re: Problem with String.gsub and \' as a replacement string On 17 Nov., 12:22, Alex Young wrote: > Backslashes are confusing. Try this: > > puts "this is a test".gsub( "a", "\\\\'" ) > > -- > Alex Thank you, you saved my day! This really is confusing, because "\\'" gives me the correct result if I don't use it with gsub: puts "\\'" -> \' Am I missing something here? Andreas