From: botp Date: 2007-11-17T22:05:02+09:00 Subject: Re: Problem with String.gsub and \' as a replacement string On Nov 17, 2007 7:20 PM, ridcully wrote: > "this is a test".gsub( "a", "\\'" ) -> "this is test test" many ways, eg ~> "this is a test".gsub("i",Regexp.escape("\\'")) => "th\\'s \\'s a test" ~> "this is a test".gsub("i"){"\\'"} => "th\\'s \\'s a test" the block form seems clean though. kind regards -botp