title: sed - extract STRING between first occurrence of MATCH1 and next occurrence of MATCH2
body: <p>Using <code>sed</code>, I would like to extract STRING between the first occurrence of <code>MATCH1</code> and the next occurrence of <code>MATCH2</code>.</p>
  
  <p><code>echo "abcd MATCH1 STRING MATCH2 efgh MATCH1 ijk MATCH2 MATCH2 lmnop MATCH1" | sed...</code></p>
  
  <p>I tried this in various ways, but given that <code>MATCH1</code> and <code>MATCH2</code> both may appear several times in a row, it has turned out difficult to extract STRING. Any idea how I can achieve this result?</p>