From: Eugen Ciur Date: 2010-07-23T23:03:52+09:00 Subject: Re: how to convert the string? "-34\n \302\240".match(/\S+/).to_s Eugen. On 07/23/2010 04:45 PM, Pen Ttt wrote: > i want to convert a string "-34\n \302\240" into "-34" > irb(main):001:0> "-34\n \302\240".gsub('\302\240','').strip.chomp > => "-34\n \302\240" > how to convert it? > thinks for your help. >