title: Remove all punctuation except apostrophes in R
body: <p>I'd like to use R's gsub to remove all punctuation from a text except for apostrophes.  I'm fairly new to regex but am learning.</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>x &lt;- "I like %$@to*&amp;, chew;: gum, but don't like|}{[] bubble@#^)( gum!?"
  gsub("[[:punct:]]", "", as.character(x))
  </code></pre>
  
  <p><strong>Current Output (no apostrophe in don't)</strong></p>
  
  <pre><code>[1] "I like to chew gum but dont like bubble gum"
  </code></pre>
  
  <p><strong>Desired Output (I desire the apostrophe in don't to stay)</strong></p>
  
  <pre><code>[1] "I like to chew gum but don't like bubble gum"
  </code></pre>