Regular expression to find string with iterating letters on the end
<p>Can someone help me with this kind of regular expression matching?</p>

<p>For example, I'm searching through list containing different strings with a letter iterating at the end of the string:</p>

<ul>
<li>MonsterA</li>
<li>MonsterB</li>
<li>MonsterC</li>
<li>HeroA</li>
<li>HeroB</li>
<li>HeroC</li>
<li>...</li>
</ul>

<p>What I need this script to return is only the preceding part of the string, in this example <strong>Monster</strong> and <strong>Hero</strong>. </p>

<p>If you absolutely need a regex:</p>

<pre><code>re.match(r"(.*)[A-Z]", word).group(1)
</code></pre>

<p>But it is not the most efficient if you just want to remove the last character.</p>

python regex string loops iterator