title: How to use RegEx to strip specific leading and trailing punctuation in PHP
body: <p>We're scrubbing a ridiculous amount of data, and am finding many examples of clean data that are left with irrelevant punctuation at the beginning and end of the final string.  Quotes and DoubleQuotes are fine, but leading/trailing dashes, commas, etc need to be removed</p>
  
  <p>I've studied the answer at <a href="https://stackoverflow.com/questions/12506655/how-can-i-remove-all-leading-and-trailing-punctuation" title="How can I remove all leading and trailing punctuation?">How can I remove all leading and trailing punctuation?</a>, but am unable to find a way to accomplish the same in PHP.</p>
  
  <pre><code>- some text.                dash and period should be removed
  "Some Other Text".          period should be removed
  it's a matter of opinion    apostrophe should be kept
  / some more text?           Slash should be removed and question mark kept
  </code></pre>
  
  <p>In short, </p>
  
  <ul>
  <li>Certain punctuation occurring BEFORE the first AlphaNumeric character must be removed</li>
  <li>Certain punctuation occurring AFTER the last AlphaNumeric character must be removed</li>
  </ul>
  
  <p>How can I accomplish this with PHP - the few examples I've found surpass my RegEx/JS abilites.</p>