title: Extract string between newline and variable data in Bash
body: <p>As part of a load test, I've a file with a generated list of requests. The format is below, in that, the payload is in between two newline characters; the GET indicating the start of a new request. I would like to extract only the payload.</p>
  
  <pre><code>Connection: false
  Content-Length: 25
  
  foo=bar1&amp;foo2=bar2
  
  GET http://localhost:1080/dasistgut
  </code></pre>
  
  <p>I have tried several combinations without success:</p>
  
  <pre><code>grep -zoP "(?&lt;=(\n)).*(?&lt;=(\GET))"  sample.txt
  grep -zoP "(?&lt;=(\n)).*(?&lt;=(\n))"  sample.txt
  grep -zoP "(?&lt;=(\n)).*(?&lt;=\n)"  sample.txt
  </code></pre>
  
  <p>Expected output: <code>foo=bar1&amp;foo2=bar2</code></p>