title: Regex for matching spaces not preceded by commas
body: <p>I need to convert a string like this:</p>
  
  <pre><code>tag, tag2, longer tag, tag3
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>tag, tag2, longer-tag, tag3
  </code></pre>
  
  <p>To make this short, I need to replace spaces not preceded by commas with hyphens, and <strong>I need to do this in Javascript</strong>.</p>