in reply to how to skip certain lines and check for blank ones?
To help you along the way : I'd iterate over the lines and use a Regular Expression at each line to determine the next action to take.
Good luck :)