Match number between '<<' (regex)
<p>I have the following string</p>

<blockquote>
  <p>All files          |  100 &lt;&lt;222>></p>
</blockquote>

<p>And would like to match the number between <code>&lt;&lt; &gt;&gt;</code></p>

<p>How can I do that? </p>

<p>So far I tried this expression <code>(?&lt;&lt;)(.*?)(?&gt;&gt;)</code></p>

<p>Try this,</p>

<pre><code>In [1]: match = re.compile(r'&lt;&lt;(\d+)&gt;&gt;')
In [2]: match.findall('100 &lt;&lt;222&gt;&gt;')
Out[2]: ['222']
</code></pre>

<p>Regex model</p>

<pre><code>&lt;&lt;(\d+)&gt;&gt;
</code></pre>

<p><img src="https://www.debuggex.com/i/igWnc7UKlm_2GgcB.png" alt="Regular expression visualization"></p>

<p><a href="https://www.debuggex.com/r/igWnc7UKlm_2GgcB" rel="nofollow">Demo</a></p>

python regex