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>Given the <a href="https://docs.python.org/2/library/re.html" rel="nofollow">doc</a>:</p>

<blockquote>
  <p>Group names must be valid Python identifiers</p>
</blockquote>

<p>As the variables, identifiers mustn't start with a number in Python. See more about identifiers <a href="https://docs.python.org/2.5/ref/identifiers.html" rel="nofollow">here</a>:</p>

<pre><code>identifier  ::=     (letter|"_") (letter | digit | "_")*
letter      ::=     lowercase | uppercase
lowercase   ::=     "a"..."z"
uppercase   ::=     "A"..."Z"
digit       ::=     "0"..."9"
</code></pre>

python regex