title: Regex to match chunks of data
body: <p>Given something like this - where the string contains line breaks and carriage returns; I added the character in to the example for brevity:</p>
  
  <pre><code>AB01 88 99 10
  \nHH01 123 123
  \nHH02 123 123
  \nHH03 123 123
  \nXX10 88 99 10
  \nHH01 456 789
  \nHH02 456 789
  \nHH03 456 789
  \nXX10 99 10 11
  </code></pre>
  
  <p>I am trying to extract groups of HH01 to HH03</p>
  
  <p>I'm expecting a result like this.</p>
  
  <pre><code>groups = [
          "HH01 123 123\nHH02 123 123\nHH03 123 123",
          "HH01 456 789\nHH02 456 789\nHH03 456 789"
           ]
  </code></pre>
  
  <p>I'm trying to extract it with regular expressions, though am not fully understanding what I'm doing. </p>
  
  <p>My expression looks like this: <code>/HH01(.*)HH03/</code></p>
  
  <p>I can't figure out how to handle the line breaks. I've tried <code>/HH01(.*)HH03/m</code> too.</p>
  
  <p>Can anybody help point me in the right direction?</p>