I have an array in this way -
arr = ["0.5", " 2016-08-25 11:02:00 +0530", " test 1",
" 0.75", " 2016-08-25 11:02:00 +0530", " test 2"]
0.5 11:02 test 1
0.75 11:02 test 2
a = ["0.5", " 2016-08-25 11:02:00 +0530", " test 1", " 0.75", " 2016-08-25 11:02:00 +0530", " test 2"]
a.each_slice(3) do |x, y, z|
puts "#{x.strip} #{y[/\d\d:\d\d/]} #{z.strip}"
end