From: unbewusst.sein@... (=?ISO-8859-1?Q?Une_B=E9vue?=) Date: 2010-05-13T23:35:11+09:00 Subject: Re: reading file after a particular line in file Robert Klemme wrote: > There's also the flip flop operator: > > File.foreach "myfile" do |line| > if /pattern/ =~ line .. false > puts line > end > end > > The trick I am using is that the FF operator starts to return true if > the first expression returns true and stays true until the last > expression returns true - in this case never since you want to read > until the end of the file. coud that trick be used for start and stop tags ? like : File.foreach "myfile" do |line| if /