What’s the equivalent of rsplit() with re.split()?
<p><a href="https://docs.python.org/2/library/stdtypes.html#str.rsplit" rel="noreferrer"><code>rsplit()</code></a> starts splitting at the end of the string. How can I start splitting at the end of the string when using <a href="https://docs.python.org/2/library/re.html#re.split" rel="noreferrer"><code>re.split()</code></a>?</p>

<p>Example:</p>

<pre><code>import re
splitme = "a!b?c!d"
re.split(r"[!\?]", splitme, maxsplit = 1)
</code></pre>

<p>Returns:</p>

<pre><code>a
</code></pre>

<p>But I want:</p>

<pre><code>d
</code></pre>

<p>While I was writing this question, I realized I could use</p>

<pre><code>re.split(r"[!\?]", splitme)[-1]
</code></pre>

<p>But that doesn’t seem like the most effective way since this splits the entire string, while we could stop after the first match (from the right).</p>