On May 1, 9:39 pm, Amasa Masiarek <a... / masiarek.com> wrote:
> 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?
> --
> Posted viahttp://www.ruby-forum.com/.


"

a1\t     b1
a2\tb2


".strip.each{|x|
  a = x.split("\t").map{|s| s.strip }
  p a.last
}