From: Ruby Newbee Date: 2009-11-22T18:12:18+09:00 Subject: Re: How to match and count 2009/11/22 Phrogz : > > # Don't read the whole file into memory, but do it one line at a time > i = 0 > file = File.open( "foo.txt" ) > file.each_line do |line| >  pieces = line.split( /\s+/ ) >  i += 1 if pieces[ 3 ] =~ /something/ > end > I like that, thank you!