From: Arlen Cuss Date: 2008-04-12T10:44:28+09:00 Subject: Re: surprise in sub ------=_Part_10523_29826883.1207964667992 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, On Sat, Apr 12, 2008 at 2:20 AM, matt neuburg wrote: > irb(main):001:0> s = "\\\\" > => "\\\\" > irb(main):002:0> s.length > => 2 > irb(main):003:0> s = "howdy".sub("howdy", s) > => "\\" > irb(main):004:0> s.length > => 1 > Yeah, escaping and escaping-of-escaping with substition and Strings being used as a poor-man's-regexp always catches me out. Thanks for the heads up on this one. Arlen ------=_Part_10523_29826883.1207964667992--