From: Bernard Kenik Date: 2008-09-09T08:24:14+09:00 Subject: Re: convert ascii codes in a string to a string of character Mark Thomas wrote: > On Sep 7, 10:19�pm, smitty wrote: >> Is there a more efficient way to convert a string such as >> "abcdef" to "abcdef" ? > > CGI::unescapeHTML(str) irb(main):029:0> a="abcdef" => "abcdef" irb(main):030:0> s = a.scan(/\d+/).collect { |ch| ch.to_i.chr }.join() => "abcdef" -- Posted via http://www.ruby-forum.com/.