title: Find multiple subpatterns and replace using back copy on multiple lines with textwrangler grep
body: <p>Currently I am using TextWrangler (mac) with the grep find/replace, but would be just as happy to use any other editor or command line tools.</p>
  
  <p>I have a text file with the structure like this (yes, there is a space at the beginning of each line):</p>
  
  <pre><code> Reference 1 -  This is a sentence with a period. And this exclaims! So does this one!
   Reference 2 -  This questions? And this, this one responds. But this YELLS!
  </code></pre>
  
  <p>And I need to keep the reference, but break each sentence into its own line, like this:</p>
  
  <pre><code> Reference 1 -  This is a sentence with a period.
   Reference 1 -  And this exclaims!
   Reference 1 -  So does this one!
   Reference 2 -  This questions?
   Reference 2 -  And this, this one responds.
   Reference 2 -  But this YELLS!
  </code></pre>
  
  <p>I can get it to keep the reference and the <em>last</em> sentence with this (copied/replaced the newline character in there, that is why the break at the end--otherwise it was matching the rest of the document):</p>
  
  <pre><code>^([^-]+ -\s+)(?:([^.!?]+?[.!?]))(([^.!?]+?[.!?])+?)$    
  </code></pre>
  
  <p>The replace is like this:</p>
  
  <pre><code>\1\2
  \1\3
  </code></pre>
  
  <p>And the results look like this:</p>
  
  <pre><code> Reference 1 -  This is a sentence.
   Reference 1 -   And this exclaims! So does this one!
  
   Reference 2 -  This questions?
   Reference 2 -   And this, this one responds. But this YELLS!
  </code></pre>
  
  <p>If I run this several times, it doesn't ever separate the other two sentences into new lines.
  But if I add another line in the replace:</p>
  
  <pre><code>\1\4
  </code></pre>
  
  <p>Then I get this as a result:</p>
  
  <pre><code> Reference 1 -  This is a sentence.
   Reference 1 -   And this exclaims! So does this one!
   Reference 1 -   So does this one!
  
   Reference 2 -  This questions?
   Reference 2 -   And this, this one responds. But this YELLS!
   Reference 2 -   But this YELLS!
  </code></pre>
  
  <p>My hope is that this is pretty simple and I am just missing a switch/modifier/etc.</p>
  
  <p>If I can do just one sentence at a time, I don't mind doing other cleaning runs.</p>
  
  <p>Any ideas?</p>