From: Derek Smith Date: 2009-08-27T01:43:11+09:00 Subject: Re: find string, get line number or position, then restart a 7stud -- wrote: > Derek Smith wrote: >> > > Huh? Huh! : ) Goal is to find pattern in file, note line number in same file, discard all prior lines while storing all proceeding lines after pattern was found? I have the regexp working and the store working to a table, however getting the syntax correct for the "start at linenumber +1 from pattern was found" is evading me. for each line in file linenumber = $. if /^string/ end for each line in file linenumber = tell line if /^string/ end Will either of the above pseudo-code work? seek to linenumber and add 1 start re-reading at linenumber+1 and store data until EOF. -- Posted via http://www.ruby-forum.com/.