title: Python regex for float or int while not splitting the float into two floats
body: <p>I'm trying to pull data from a file that can either be an int or a float. I've found this regex that will pull these two types from the file <code>(\d+(\.\d+)?)</code>, but the problem I'm having with it is that it's splitting the floats into two.</p>
  
  <pre><code>&gt;&gt;&gt; import re
  &gt;&gt;&gt; line = "(gr_line (start 218.948 126.111) (end 218.948 143.637) (angle 90) (layer Edge.Cuts) (width 0.1) (tstamp 53D2B530))"
  &gt;&gt;&gt;
  &gt;&gt;&gt; print re.findall(r'\(start (\d+(\.\d+)?) (\d+(\.\d+)?)\)', line)
  [('218.948', '.948', '126.111', '.111')]
  &gt;&gt;&gt;
  </code></pre>
  
  <p>The purpose of this is to get the starting coordinates which are defined by (start n n), but as you can see, it's taking 218.948 and splitting it into <code>218.948</code> and <code>.948</code>. Same issue with <code>126.111</code>.</p>
  
  <p>If the input string has an int in the starting brackets, I get the following:</p>
  
  <pre><code>&gt;&gt;&gt; line = "(gr_line (start 218.948 126) (end 218.948 143.637) (angle 90) (layer Edge.Cuts) (width 0.1) (tstamp 53D2B530))"
  &gt;&gt;&gt; print re.findall(r'\(start (\d+(\.\d+)?) (\d+(\.\d+)?)\)', line)
  [('218.948', '.948', '126', '')]
  &gt;&gt;&gt;
  </code></pre>
  
  <p>The issue here is the added empty index - not a huge problem, but a little inconvenient. </p>
  
  <p>How can I format my regex so it captures either a float and return that float, or an int and return that int. </p>