title: Python to extract data from a file
body: <p>I am trying to extract the text between that has specific text file:  </p>
  
  <pre><code>----
  data1
  data1
  data1
  extractme
  ----
  data2
  data2
  data2
  ----
  data3
  data3
  extractme
  ----
  </code></pre>
  
  <p>and then dump it to text file so that</p>
  
  <pre><code>----
  data1
  data1
  data1
  extractme
  ---
  data3
  data3
  extractme
  ---
  </code></pre>
  
  <p>Thanks for the help.</p>