group name can't start with number?
<p>It looks like I can't use regex like this one,</p>

<pre><code>(?P&lt;74xxx&gt;[0-9]+)
</code></pre>

<p>With re package it would raise and error,</p>

<pre><code>sre_constants.error: bad character in group name u'74xxx'
</code></pre>

<p>It looks like I can't use group names that starts with a number, why?</p>

<p>P.S golang does not have such problem, so does many other languages</p>

<p>If this is the pattern you are searching <code>r'(?P&lt;74xxx&gt;[0-9]+)'</code> and you wanted to include <code>?</code> in your search pattern then you have to prepend <code>\</code> with it since it is the special character in python. So your search pattern should be <code>r'(\?P&lt;74xxx&gt;[0-9]+)'</code>.</p>

python regex