title: Python regex "OR" gives empty string when using findall
body: <p>I'm using a simple regex <code>(.*?)(\d+[.]\d+)|(.*?)(\d+)</code> to match int/float/double value in a string. When doing <code>findall</code> the regex shows empty strings in the output. The empty strings gets removed when I remove the <code>|</code> operator and do an individual match. I had also tried this on <a href="https://regex101.com/" rel="nofollow noreferrer">regex101</a> it doesn't show any empty string. How can I remove this empty strings ? Here's my code:</p>
  
  <pre><code>&gt;&gt;&gt;import re
  &gt;&gt;&gt;match_float = re.compile('(.*?)(\d+[.]\d+)|(.*?)(\d+)')
  &gt;&gt;&gt;match_float.findall("CA$1.90")  
  &gt;&gt;&gt;match_float.findall("RM1")
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>&gt;&gt;&gt;[('CA$', '1.90', '', '')]
  &gt;&gt;&gt;[('', '', 'RM', '1')]
  </code></pre>