title: Python Regex return both results when 2 conditions set which partially satisfy one another WITHOUT IF statements nor Test groups and NOT AS A TUPLE
body: <p>I'm going to have quite a few questions about regex in the coming days. Out of 10 challenges I gave myself over the past 5 days, I managed to solve 6.</p>
  
  <p>I'm hoping the following isn't simple and embarrassing, but what I'm trying to do use re.findall to return results for both conditions even though the condition for set 2 may have already partially been satisfied by set 1.</p>
  
  <p>Example (Problem):</p>
  
  <pre><code>&gt;&gt;&gt; str = 'ab1cd2efg1hij2k'
  &gt;&gt;&gt; re.findall('ab1cd|ab', str)
  ['ab1cd']
  &gt;&gt;&gt; re.findall('ab|ab1cd', str)
  ['ab']
  </code></pre>
  
  <p>So notice that depending on whichever comes first in the OR statement determines what the single element of the array is. What I want is to be able to return both for a 2 element array and preferably not a Tuple. The readings I've done on regex ANDing have focused on making regexes match 2 different strings as opposed to returning multiple results that may mutually satisfy one another partially. Below is what I desire.</p>
  
  <p>Desired Output:</p>
  
  <pre><code>&gt;&gt;&gt; str = 'ab1cd2efg1hij2k'
  &gt;&gt;&gt; re.findall('{SOMETHING_THAT_RETURNS_BOTH}', str)
  ['ab', 'ab1cd']
  </code></pre>
  
  <p>The closest I've gotten is the following:</p>
  
  <pre><code>&gt;&gt;&gt; re.findall('ab|[\S]+?(?=2e)', str)
  ['ab', '1cd']
  &gt;&gt;&gt; re.findall('ab|[\S]+(?=2e)', str)
  ['ab', '1cd']
  </code></pre>
  
  <p>but the second capture group ignores ab. Is there a directive in regex to say restart from the beginning? (?:^) seems to work the same as a ^ and using it in several ways didn't help thus far. Please note I DO NOT want to use regex IF statements nor test to see if a previous group matched just yet because I'm not quite ready to learn those methods before forming a more solid foundation for the things I don't yet know. </p>
  
  <p>Thanks so much.</p>