title: Get numerical patterns from a line using sed/grep
body: <p>I have a stream of lines as follows </p>
  
  <pre><code>iter: 0 ival: 0, fcost =               0
  iter: 0 ival: 1, fcost =               1
  iter: 0 ival: 2, fcost =    0.7115281224
  iter: 1 ival: 3, fcost =    0.3990854323
  iter: 2 ival: 4, fcost =    0.1486154944
  iter: 3 ival: 5, fcost =    0.1353816539
  iter: 4 ival: 6, fcost =    0.1013548374
  iter: 5 ival: 7, fcost =    0.1856721342
  </code></pre>
  
  <p>I want to get comma or space separated numerical values from this stream of lines. 
  Something like this</p>
  
  <pre><code>0 0 0
  0 1 1
  0 2 0.7115281224
  1 3 0.3990854323
  2 4 0.1486154944
  3 5 0.1353816539
  4 6 0.1013548374
  5 7 0.1856721342
  5 8 0.08961682022
  6 9 0.08508076519
  </code></pre>
  
  <p>Is there a way I can do it using grep or sed?</p>