From: David Springer Date: 2010-04-01T09:29:36+09:00 Subject: Re: how to solve this regular expression problem OK I was wrong. This does work. s.gsub!(/#(\d+);/) { '\\'+$1.to_i.to_s(8)} What I offered does not. -- Posted via http://www.ruby-forum.com/.