2008/5/1 Amasa Masiarek <adam / masiarek.com>:
> s = <<EOS
>  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/