title: Ruby regexp to match comma, but ignore comma in brackets
body: <p>I'm trying to split a parameter list by regexp.</p>
  
  <p>This is a string with my parameter list:</p>
  
  <pre><code>"a = b, c = 3, d = [1,3,5,7], e, f = g"
  </code></pre>
  
  <p>What I want is:</p>
  
  <pre><code>["a = b", "c = 3", "d = [1,3,5,7]", "e", "f = g"]
  </code></pre>
  
  <p>I tried with a lookahead, but Ruby doesn't allow lookbehinds with a dynamic range, so this won't work:</p>
  
  <pre><code>/(?&lt;!\[),(?!\w*\])/
  </code></pre>
  
  <p>How can I tell the regexp to ignore everything in square brackets?</p>