title: Python removing punctuation from unicode string except apostrophe
body: <p>I found several topics of this and I found this solution:</p>
  
  <pre><code>sentence=re.sub(ur"[^\P{P}'|-]+",'',sentence)
  </code></pre>
  
  <p>This should remove every punctuation except ', the problem is it also strips everything else from the sentence.</p>
  
  <p>Example:</p>
  
  <pre><code>&gt;&gt;&gt; sentence="warhol's art used many types of media, including hand drawing, painting, printmaking, photography, silk screening, sculpture, film, and music."
  &gt;&gt;&gt; sentence=re.sub(ur"[^\P{P}']+",'',sentence)
  &gt;&gt;&gt; print sentence
  '
  </code></pre>
  
  <p>of course what I want is to keep the sentence without punctuation, and "warhol's" stays as is</p>
  
  <p>Desired output:</p>
  
  <pre><code>"warhol's art used many types of media including hand drawing painting printmaking photography silk screening sculpture film and music"
  "austro-hungarian empire"
  </code></pre>
  
  <p>Edit:
   I also tried using</p>
  
  <pre><code>tbl = dict.fromkeys(i for i in xrange(sys.maxunicode)
      if unicodedata.category(unichr(i)).startswith('P')) 
  sentence = sentence.translate(tbl)
  </code></pre>
  
  <p>but this strips every punctuation</p>