From: Rick DeNatale Date: 2008-05-02T11:48:29+09:00 Subject: Re: strip method 2008/5/1 Amasa Masiarek : > s = < a1\t b1 > a2\tb2 > EOS > > s.each{|e| > a = e.strip.split("\t") > p a[1] > } > > output: > " b1" > "b2" > > expected output: > "b1" > "b2" > > What is wrong? k$ qri String#strip ----------------------------------------------------------- String#strip str.strip => new_str ------------------------------------------------------------------------ Returns a copy of str with leading and trailing whitespace removed. Leading and trailing doesn't mean internal. So: "a1\t b1".strip #=> "a1\t b1" -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/