From: 7stud -- Date: 2011-05-27T07:14:46+09:00 Subject: Re: Need help bringing select array lines together Paul wrote in post #1001335: > I'm not sure about the 'join' solution for 2 reasons: Okay. How about: original_lines = [ %q{"Only one line."}, %q{"line 1 }, %q{ line 2."}, ] combined_lines = [] temp = '' original_lines.each do |line| temp << line if temp[-1] == %q{"} combined_lines << temp temp = '' end end p combined_lines --output:-- ["\"Only one line.\"", "\"line 1 line 2.\""] -- Posted via http://www.ruby-forum.com/.