title: Splitting first sentence of string
body: <p>I have a string that is a paragraph that I am attempting to use the <code>split</code> method to return just the first sentence of that paragraph. My goal is to append the first sentence and the rest of the paragraph separately. I'm able to return the first sentence, but I am also expecting the first sentence to no longer appear from the original <code>data</code>. In this case even though I split the first sentence successfully it does remain in <code>data</code> how can I have separate these two?</p>
  <p>For example :</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> const data = "The amount spent on gasoline continues to be a large expense to many individuals. The average amount spent on gasoline per year is $2000. This number can easily change as the price of gasoline is rapidly changing."
  
  let firstSentence = data.split('\.', 1)[0];
  
  console.log(firstSentence)
  
  console.log(data)</code></pre>
  </div>
  </div>
  </p>
  <p>My expected outcome is:</p>
  <p><code>first sentence: &quot;The amount spent on gasoline continues to be a large expense to many individuals.&quot;</code></p>
  <p><code>data: &quot;The average amount spent on gasoline per year is $2000. This number can easily change as the price of gasoline is rapidly changing.</code></p>