From: Max Schmidt Date: 2010-04-01T08:13:51+09:00 Subject: Re: how to solve this regular expression problem >s.gsub!(/#(\d+);/) { '\'+$1.to_i.to_s(8)} >is giving some compile error. You have to escape the slash (\) like this >s.gsub!(/#(\d+);/) { '\\'+$1.to_i.to_s(8)} -- Posted via http://www.ruby-forum.com/.