title: Regular expression to replace spaces between numbers with a comma
body: <p>I have a huge list of the following in a large file that contains information about every country in the world.</p>
  
  <p>They are arrays of temperature data, sometimes the spaces vary in length.</p>
  
  <pre><code>[23.5  26.3  29.3  31.9  32.8  31.2  28.8  27.8  28.4  29  26.6  23.7]
  </code></pre>
  
  <p>I'm attempting to use sublime to write a regular expression but I cannot get my head around them.</p>
  
  <p>So far the closest thing I've got is:</p>
  
  <pre><code>( \S+)\(.+ )
  </code></pre>
  
  <p>How would one write a regular expression replacing the line to look like this:</p>
  
  <pre><code>[23.8,25.5,27.2,28.3,29.3,29.5,28.7,28.1,28.2,28.9,27.2,24.4]
  </code></pre>
  
  <p>Any help would be great thanks.</p>
  
  <p>**Edit
  I'm using sublime text.</p>