title: How do I remove all punctuation that follows a string?
body: <p>It's for a game in which the user can input a value like "Iced tea.." 
  I would like to manipulate the string to return "Iced tea" without the trailing punctuation marks. </p>
  
  <p>Looking for most elegant / simplest python solution. </p>
  
  <p>Tried </p>
  
  <pre><code>def last_character(word):
    if word.endswith('.' or ','):
        word = word[:-1]
    return word 
  </code></pre>
  
  <p>which works if there's only one punctuation mark at the end. But it's not all-encompassing. </p>
  
  <p>Found a <a href="https://stackoverflow.com/questions/8115679/how-do-i-remove-all-punctuation-that-follows-a-single-word-in-java">Java solution</a>:</p>
  
  <pre><code>String resultString = subjectString.replaceAll("([a-z]+)[?:!.,;]*", "$1");
  </code></pre>