title: strsplit on all spaces and punctuation except apostrophes
body: <p>I have asked related questions <a href="https://stackoverflow.com/questions/13372438/regex-eliminate-all-punctuation-except">HERE</a> and <a href="https://stackoverflow.com/questions/8697079/remove-all-punctuation-except-apostrophes-in-r">HERE</a>.  I tried to generalize these answers but have failed.</p>
  
  <p>Basically I have a string I want to split into words, numbers and any sort of punctuation, yet, I want to retain the apostrophes.  Here is what I've tried and I'm so close (I think):</p>
  
  <pre><code>x &lt;- "Raptors don't like robots! I'd pay $500.00 to rid them."
  
  strsplit(x, "(\\s+)|(?=[[:punct:]])", perl = TRUE)
  
  ## [[1]]
  ##  [1] "Raptors" "don"     "'"       "t"       "like"    "robots"  "!"             
  ##  [8] ""   "I"   "'"    "d"  "pay"     "$"       "500"     "."       "00"      "to"         
  ## [20] "rid"   "them"    "."  
  </code></pre>
  
  <p>Here's what I'm after:</p>
  
  <pre><code>## [[1]]
  ##  [1] "Raptors" "don't"       "like"    "robots"  "!"       ""        "I'd"      
  ##  [8] "pay"     "$"       "500"   "."   "00"  "to"      "rid"     "them"    "."  
  </code></pre>
  
  <p>While I want a base solution I would like to see other solutions (I'm sure someone has a stringr solution) which makes the question more generalizable to others.</p>
  
  <p><strong><em>Note:</em></strong> <em>R has a specific regex system.  You will want to be familiar with R to answer this question.</em></p>