in reply to Re^2: need to extract top and bottom lines...
in thread need to extract top and bottom lines...

In that case I'd use awk to solve this problem.
  • Comment on Re^3: need to extract top and bottom lines...