title: regular expression: chopping last character if second last is upper case?
body: <p>I want to chop off last character if it is lower case and second last one is upper case. For example.</p>
  
  <pre><code>14-ME -&gt; 14-ME
  MEA  -&gt; MEA
  MEAm -&gt; MEA  #like this one
  mama -&gt; mama
  </code></pre>
  
  <p>How to write the regx ? I am thinking of something like r"(.+?)" but not sure how to do conditional thing on the last part. The word could have anything like ()-,+ too.</p>
  
  <p>thanks</p>