From: Jens Nissen Date: 2001-12-20T00:03:42+09:00 Subject: [ruby-talk:28932] Re: Backslash Sequence Bug? "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" :-) Jens