title: Including separator characters in split (javascript)
body: <p>This is a textarea. The user can write anything.</p>
  
  <pre><code>&lt;textarea id="text"&gt;First sentence. Second sentence? Third sentence!
  Fourth sentence.
  
  Fifth sentence
  &lt;/textarea&gt;
  </code></pre>
  
  <p>At the end, i have to split all the text into an array.</p>
  
  <pre><code>var sentences = $('#text').val().split(/\r\n|\r|\n|[.|!|?]\s/gi);
  </code></pre>
  
  <p>The issue i'm having, is that the separator characters are not present in the array item values. This is what <strong>sentences</strong> is returning:</p>
  
  <pre><code>["First sentence", "Second sentence", "Third sentence", "Fourth sentence", "Fifth sentence"]
  </code></pre>
  
  <p>It should be:</p>
  
  <pre><code>["First sentence.", "Second sentence?", "Third sentence!", "", "Fourth sentence.", "", "", "Fifth sentence"]
  </code></pre>
  
  <p>Extra considerations:</p>
  
  <ul>
  <li>last sentence doesn't require a separator character (it can end at any char)</li>
  <li>if a sentence has more than one separator char, it should also be included in the array item. Example: <strong>second sentence??</strong> should be [...,"second sentence??",...]</li>
  </ul>
  
  <p>Any ideas? Any approach is welcome (not split() necessarily) - <strong>Thanks</strong>!</p>