From: Terry Michaels Date: 2010-10-04T11:19:06+09:00 Subject: save only first line from string? Hi. What's the most simple and elegant way to remove all the contents of a String except for the first line? (Assume string consist of one line, multiple lines, or no lines, and assume that we don't know which OS we are on.) -- Posted via http://www.ruby-forum.com/.