From: Uwe Lammers Date: 2007-08-04T21:46:22+09:00 Subject: Help: Matching last character of a string! Hi, I am trying to replace the last character of a string with another character: x = "{Hello {hello}}" x.sub!(/\}$/, "]") puts x With Ruby 1.8.5 (on Windows) this gives (as expected) {Hello {hello}] With Ruby 1.8.1 (on Linux) I get (surprisingly) {Hello {hello}} Who knows what is going on? Can't believe a fundamental bug like this was still in 1.8.1 ... Cheers Uwe -- Posted via http://www.ruby-forum.com/.