P
Pen Ttt
i want to make 'gkhj*&()' into 'gkhj',here is my code
item='gkhj*&()'
item=item.map{|echar|
if /[a-z]/=~ echar then
echar=echar
else
echar=''
end}
puts item
why i can't get what i want?
Any advice appriciated.
item='gkhj*&()'
item=item.map{|echar|
if /[a-z]/=~ echar then
echar=echar
else
echar=''
end}
puts item
why i can't get what i want?
Any advice appriciated.