title: Ruby, Split Text Into Sentences
body: <p>Following a tutorial in a book, using the following code to split text into sentences,</p>
  
  <pre><code>def sentences
      gsub(/\n|\r/, ' ').split(/\.\s*/)
  end
  </code></pre>
  
  <p>It works, but if theres a newline which began without a period preceding it, for example,</p>
  
  <pre><code>Hello. two line sentence
  and heres the new line
  </code></pre>
  
  <p>theres a "\t" placed at the beginning of each sentence.  So if i called the method on the above sentence i would get </p>
  
  <pre><code>["Hello." "two line sentence /tand heres the new line"]
  </code></pre>
  
  <p>Any help would be much appreciated! Thanks!</p>