title: Matching greater than HTML character with Regex in Python
body: <p>I'm trying to use re.compile to match a value on a web page</p>
  
  <p>My web page contains the following HTML:</p>
  
  <pre><code>&lt;div id="paginate"&gt;
  &amp;nbsp;&lt;strong&gt;1&lt;/strong&gt;
  &amp;nbsp;&lt;a href="http://www.link2.com/"&gt;2&lt;/a&gt;
  &amp;nbsp;&lt;a href="http://www.link3.com/"&gt;3&lt;/a&gt;
  &amp;nbsp;&lt;a href="http://www.link2.com"&gt;&amp;gt;&lt;/a&gt;
  &amp;nbsp;&amp;nbsp;&lt;a href="http://www.link20.com/"&gt;Last &amp;rsaquo;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My regex is as follows:</p>
  
  <pre><code>re.compile('&lt;a href="(.+?)"&gt;&amp;gt;&lt;/a&gt;').findall()
  </code></pre>
  
  <p>This returns</p>
  
  <pre><code>['http://www.link2.com/"&gt;2&lt;/a&gt;
  &amp;nbsp;&lt;a href="http://www.link3.com"&gt;3&lt;/a&gt;
  &amp;nbsp;&lt;a href="http://www.link2.com/']
  </code></pre>
  
  <p>I only want to get the href of the link which contains the greater than symbol as it's label?</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks in advance</p>