From: Harry Kakueki Date: 2010-08-29T23:24:35+09:00 Subject: Re: delete char On Sun, Aug 29, 2010 at 9:45 PM, Pen Ttt wrote: > it is ok,but i want to know  why my code can't run? > -- > Posted via http://www.ruby-forum.com/. > > I think you should take the advice of someone who shows you a Ruby way, but.... I looked at your code and modified it a little. It seems to work but I'm tired so this is all I can offer now. item='gkhj*&()' #item = '((c)?' item=item.split(//).map{|echar| if /[a-z]/=~ echar then echar=echar else echar='' end} p item*"" I would not do it this way but you wanted to know why your code did not work. Harry