capture all matches in regex (g modifier not working for me)
<p>If I want to capture all of the last term in each product in this pattern:</p>

<pre><code>PatternAnchor: Product-Computer-Keyboard, 
Product-Computer-Monitor, Product-Computer-Motherboard PatternEnd:
</code></pre>

<p>I tried this:</p>

<pre><code>PatternAnchor: Product-(.*?)-(?P&lt;Item&gt;.*?)(,|PatternEnd:)
</code></pre>

<p>but I still only get the first match.</p>

<p><a href="https://regex101.com/r/cR0aG8/1" rel="nofollow">https://regex101.com/r/cR0aG8/1</a></p>

<p>Is this what you want? </p>

<p><a href="https://regex101.com/r/mM1cV0/2" rel="nofollow">https://regex101.com/r/mM1cV0/2</a></p>

<p>Your description and code/example feels very different to each other.</p>

python regex