title: python - how to get overlapping text matches in regex
body: <p>I am using the following to get all matches including overlapping as per <a href="https://stackoverflow.com/questions/5616822/python-regex-find-all-overlapping-matches">recommendations</a> on <a href="https://stackoverflow.com/questions/11430863/how-to-find-overlapping-matches-with-a-regexp">other</a> threads:</p>
  
  <pre><code>[(m.start(0), m.end(0)) for m in re.findall(t,s,overlapped = True)]
  </code></pre>
  
  <p>where t is a subset of s. However, I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: findall() got an unexpected keyword argument 'overlapped.'
  </code></pre>
  
  <p>What am I doing wrong/is overlapped an outdated flag/how would you do it? All help is much appreciated.</p>