title: How to: Overlapping match
body: <p>Lets say we have this: </p>
  
  <pre><code>A2 A1 B.         #1
  
  A1 B.            #2
  
  A3 A1 A8 B.      #3
  </code></pre>
  
  <p>How would I go about if I want:</p>
  
  <ol>
  <li>To match: <code>A2 A1 B.</code> and <code>A1 B.</code> <br></li>
  <li>To match: <code>A1 B.</code> <br></li>
  <li>To match: <code>A3 A1 A8 B.</code> and <code>A1 A8 B.</code> and <code>A8 B.</code></li>
  </ol>
  
  <p>So far I've got this regex:</p>
  
  <pre><code>A\d\s(.*\.)
  </code></pre>
  
  <p>But it won't match subsets of code that's already been matched (I'm matching using <code>re.finditer</code>)/  My guess is that <code>re.finditer</code> is doing just as its supposed to, and I'm just trying to force it into doing stupid stuff.</p>
  
  <p><a href="https://regex101.com/r/ADQwFG/36" rel="nofollow noreferrer">Playground</a></p>