From: Seebs Date: 2010-01-26T02:30:05+09:00 Subject: Re: gsub problem On 2010-01-25, lalawawa wrote: > irb(main):005:0> a.gsub(/([\'\?])/, '\\\\\1') >=> "Can\\'t we\\?" This is probably what you want -- keep in mind that irb will show you escaped backslashes if there's a single backslash in the string. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!