title: REGEX to capture sentences with quotes
body: <p>I am having trouble putting together a regex to match quotes and sentences. Here are the (simplified) specs I am trying to meet:</p>
  
  <ul>
  <li><p>A sentence is a chain of characters followed by a punctuation mark (a dot, to keep things simple) or a newline.</p></li>
  <li><p>A quote is a chain of characters between two <code>"</code>.</p></li>
  <li><p>Each sentence should be a new match.</p></li>
  <li><p>A sentence can contain quotes, and quotes can contain sentences. Only the last sentence in a quote should end the capture.</p></li>
  </ul>
  
  <p>So far I have come up with this: <code>\s*((?:("[^"]*")|[^.\n])*\.+"?)\s*</code></p>
  
  <p>Test case: <a href="https://regex101.com/r/rT3iZ4/1" rel="nofollow">REGEX101</a></p>
  
  <p>As you can see I can't properly separate quotes from sentences. For example:</p>
  
  <p>§2: <code>"Your lordship," Mya informed Lord Robert, "Lady Waynwood’s banners have been seen an hour down the road. She will be here soon, with your cousin Harry. Will you want to greet them"</code> Should be a full match, but the regex gives me three and captures the next paragraph.</p>
  
  <p>§3: <code>"They were invited," she said uncertainly, "for the tourney. I don’t..."</code> Should stop as a full match , but the regex goes on to capture <code>Alayne closed her book.</code></p>
  
  <p>I can't figure out what is going wrong, any help would be very much appreciated.</p>
  
  <p>EDIT: <a href="http://i.stack.imgur.com/G7g8L.png" rel="nofollow">DESIRED OUTPUT</a></p>