title: A regex to match a comma that isn't surrounded by quotes
body: <p>I'm using Clojure, so this is in the context of Java regexes.</p>
  
  <p>Here is an example string:</p>
  
  <pre><code>{:a "ab,cd, efg", :b "ab,def, egf,", :c "Conjecture"}
  </code></pre>
  
  <p>The important bits are the commas after each string. I'd like to be able to replace them with newline characters with Java's replaceAll method. A regex that will match <em>any</em> comma that is not surrounded by quotes will do.</p>
  
  <p>If I'm not coming across well, please ask and I'll be happily to clarify anything.</p>
  
  <p><em>edit: sorry for the confusion in the title. I haven't been awake very long.</em></p>
  
  <p>String: <code>{:a "ab, cd efg",}</code> &lt;-- In this example, the comma at the end would be matched, but the ones inside the quote would not.</p>
  
  <p>String: <code>{:a 3, :b 3,}</code> &lt;-- Every single comma matches.</p>
  
  <p>String <code>{:a "abcd,efg" :b "abcedg,e"}</code> &lt;-- Every single comma doesn't match.</p>