From: Glenn Jackman Date: 2009-08-07T01:20:09+09:00 Subject: Re: Trimming some string using ruby At 2009-08-06 02:31AM, "Shekar Ls" wrote: > I have the following information in a text file, which looks > like this: > > -rw-rw-r-- 1 user user 12203 Aug 6 01:02 app1.sql > -rw-rw-r-- 1 user user 12343 Aug 6 01:02 app2.sql > -rw-rw-r-- 1 user user 12238 Aug 6 01:02 app3.sql > > I need to Trim the unwanted strings and my output should look like this: > > app1.sql > app2.sql > app3.sql If you have the whole contents of the file in a variable, then: text = <