From: David Springer on
> s.gsub!(/#(\d+);/, "\134\134#{conv_char($)}")
I meant:
s.gsub!(/#(\d+);/, "\134\134#{conv_char($1)}")

I'm having trouble doing copy & paste from irb under windows.

David
--
Posted via http://www.ruby-forum.com/.

From: Max Schmidt on
>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/.