From: Robert Klemme Date: 2010-07-24T16:55:04+09:00 Subject: Re: how to convert the string? On 24.07.2010 05:28, Pen Ttt wrote: > maybe match(/\S+/).to_s is not ok > would you mind to help me to find a way(one way not three way for the > following) to convert > > "Dec 31, 2009/n \302\240" into "Dec 31, 2009" > "-34/n \302\240" into "-34" > "profit/n \302\240" into "profit" What output do you expect for every input? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/