Python regular expression always return None : <p>I want to get userid from url like:</p>

<pre><code>http://space.bilibili.com/1950746/#!/channel/detail?cid=1757&amp;order=&amp;page=1
</code></pre>

<p>and it should be like 1950746.</p>

<p>And here is the code:</p>

<pre><code>url='http://space.bilibili.com/1950746/#!/channel/detail?cid=1757&amp;order=&amp;page=1'
b=userid=re.match(r'\d{7}', url)
print(b)
</code></pre>

<p>The result is None.</p>
