From: "RĂ¼diger Bahns" Date: 2009-10-09T21:35:11+09:00 Subject: Re: find a print out a line Collin Moore schrieb: > Hi > I am slowly learning Ruby and working on a solution. I have huge text > files with tons of garbage and I want to extract just specific lines > including the word 'TestPhase'. > > Looking for simple solutions, just struggling with the problem. > > Thanks in advance for advice and help. To reduce the array File.readlines returns to only the lines that contain 'TestPhase' use File.readlines('file.txt').grep /TestPhase/