python regular express how to take a value that could or could not be proceeded by "&page=2"
<p>These are the possible strings i might face</p>

<blockquote>
  <p><a href="http://bla" rel="nofollow">http://bla</a> bla bla/?another bla bla bla</p>
  
  <p><a href="http://bla" rel="nofollow">http://bla</a> bla bla/?another bla bla bla&amp;page=3</p>
</blockquote>

<h3>My question</h3>

<p>I want to take </p>

<blockquote>
  <p><a href="http://bla" rel="nofollow">http://bla</a> bla bla/?another bla bla bla</p>
</blockquote>

<h3>What I tried</h3>

<pre><code>re.match("(.*)^&amp;page=+\d",value).group(1)
</code></pre>

<p>where <code>value</code> is a prameter that has the value of the string.</p>

<p>but I get :</p>

<pre><code>AttributeError: 'NoneType' object has no attribute 'group'
</code></pre>

<p>I know the reason (which is the regular expression is wrong), but I don't know the solution </p>