title: Regex Matching floating numbers in between commas
body: <p>I have a data set as follows</p>
  <pre><code>0,0 1868.37507375 -984.46051955 388.44592850 2 0    
      0,10 -7.0710700000e-01 -7.0710700000e-01 
          0.0000000000e+00 5.7735026919e-01 -5.7735026919e-01 5.77
  0,11 7.0710700000e-01 7.0710700000e-01 0.0000000000e+00
      5.7735026919e-01 -5.7735026919e-01 5.35
  </code></pre>
  <p>I am trying to write a regex code inside a loop such that it matches <strong>seven floating numbers between commas</strong>. If the regex doesn't match, the loop will move to next set of digits. (except the very first digit before the first comma which is 0)</p>
  <p>For example.
  First set of digits will be matched until 5.77 b/c the data doesn't contain a comma after 5.77 and 5.77 is the seventh number after a comma.</p>
  <p>The next set of digits is matched until 5.35 b/c the data lacks a comma after 5.35 and 5.35 is the seventh number after a comma</p>
  <pre><code>Line 1: 0,0 1868.37507375 -984.46051955 388.44592850 2 0    
          0,10 -7.0710700000e-01 -7.0710700000e-01 0.0000000000e+00
          5.7735026919e-01 -5.7735026919e-01 5.77
  
  Line 2: 0,11 7.0710700000e-01 7.0710700000e-01 0.0000000000e+00
          5.7735026919e-01 -5.7735026919e-01 5.35
  </code></pre>
  <p>The closest answer I found was <a href="https://stackoverflow.com/questions/6308497/perl-if-line-matches-regex-ignore-line-and-move-onto-next-line-in-file">here</a> and <a href="https://stackoverflow.com/questions/2139715/regex-matching-numbers-with-floating-point">here</a>. But it didn't end up being much help.</p>
  <p>I am using Python 3.8.10</p>