From: Justin Collins Date: 2007-11-07T11:26:52+09:00 Subject: Re: Escaping characters Jeremy Woertink wrote: > yermej wrote: > >> On Nov 6, 7:00 pm, Jeremy Woertink wrote: >> >>> second one I would expect it to return "\", instead it returns "\\" both >>> the string that is returned is still wrong. >>> >>> ~Jeremy >>> -- >>> Posted viahttp://www.ruby-forum.com/. >>> >> If you actually output the string: >> >> >>> puts '\\' >>> >> \ >> => nil >> >> you should get the result you're expecting. >> > Rock on. > > So basically I had to do \\\\ just to get \\ and \\ just to get \. > Crazy, but it works so I'm happy. > Thanks > > > ~Jeremy > Decent explanation here: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/240303 -Justin