I want to remove blocks from text file starting and ending with certain lines using Ruby.
I have generated text file containing HTTP request response but want to remove all responses leaving only headers in file.Response blocks start with reading all... line and ends with Conn close line.
How can I remove such blocks from my text file?
Example code is following: