title: Regex for soccer data
body: <p>Why isn't my regex working? It just returns back the original file. My file looks like this (for a few hundred lines):</p>
  
  <pre><code>1    Germany    1765    0   Equal   
  2    Argentina  1631    0   Equal   
  3    Colombia   1488    1   Up  
  4    Netherlands    1456    -1  Down    
  5    Belgium    1444    0   Equal   
  6    Brazil 1291    1   Up  
  7    Uruguay    1243    -1  Down    
  8    Spain  1228    -1  Down    
  9    France 1202    1   Up  
  ...
  192  US Virgin Islands  28  -1  Down    
  </code></pre>
  
  <p>And I want this:</p>
  
  <pre><code>Germany,1
  Argentina,2
  Colombia,3
  ...
  US Virgin Islands,192
  </code></pre>
  
  <p>This is the regex I tried:</p>
  
  <pre><code> sed 's/\([0-9]*\)\t\([a-zA-Z]*\)/\2,\1/g' &lt;fifa.csv &gt;fifa.csv
  </code></pre>
  
  <p>But it just returns the original file.
  EDIT:
  Now I tried </p>
  
  <pre><code>sed 's/\([0-9]*\)\t\([a-zA-Z]*\)/\2,\1/g' &lt;fifa.csv &gt;fifa.csv
  </code></pre>
  
  <p>and got </p>
  
  <pre><code>,1 Germany,,1765Equal,0,
  ,2 Argentina,,1631Equal,0,
  ,3 Colombia,,1488Up,1,
  ,4 Netherlands,,1456-Down,1,
  ,5 Belgium,,1444Equal,0,
  </code></pre>