I would count the number of carriage returns, and the when you have the right number gather the data you want.