From: Jesse Jones Date: 2001-12-20T00:31:28+09:00 Subject: [ruby-talk:28949] Re: Backslash Sequence Bug? In article <9vn3dh$gfl6v$1@ID-104974.news.dfncis.de>, Jens Nissen wrote: > "Jesse Jones" schrieb im Newsbeitrag > news:181220010026083370%jesjones@mindspring.com... > > According to the pickaxe book (page 64), this: > > > > text = "fred:smith" > > puts text.sub(/(\w+):(\w+)/, "\2, \1") > > > > should print "smith:fred", but on my system it prints ", ". Ruby > > -version returns: > > > > Replace >> "\2, \1" << by >> '\2, \1' << and everything works fine. > See page 64 in "Programming Ruby" :-) Damn, I could have sworn I had tried that. Thanks for the help. :-) -- Jesse