From: "Wolfgang Nádasi-Donner" Date: 2007-11-18T08:14:28+09:00 Subject: Re: String escape mystery. Rick Denatale wrote: > On Nov 17, 2007 5:52 PM, Stefan Rusterholz wrote: >> > >> > http://talklikeaduck.denhaven2.com/ >> >> Hu? >> I fail to see what exactly is your problem. \b is backspace, so the a >> becomes deleted in the output. In the inspect of course it still shows >> up. \\ is a literal \ and that is followed by a c, so "\\c" naturally >> prints as \c >> Did I miss your point or so? > > > No it was just a brain fart on my part. > > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/ Please take a look at... irb(main):001:0> "a\b\c"" => "a\b\002" ...and the documentation in http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html in "Basic Types", subchapter "Strings" is a table... Substitutions in double-quoted strings \a Bell/alert (0x07) \nnn Octal nnn \b Backspace (0x08) \xnn Hex nn \e Escape (0x1b) \cx Control-x \f Formfeed (0x0c) \C-x Control-x \n Newline (0x0a) \M-x Meta-x \r Return (0x0d) \M-\C-x Meta-control-x \s Space (0x20) \x x \t Tab (0x09) #{expr} Value of expr \v Vertical tab (0x0b) ...which explains everything in detail. Wolfgang Nádasi-Donner -- Posted via http://www.ruby-forum.com/.