title: Regex for creating an array from String
body: <p>I have a string as follows</p>
  
  <pre><code>var str = "[series-3,series-5,series-6],[a3,a4,a5],[class a,class b]";
  </code></pre>
  
  <p>I want to get three arrays from above string as follows</p>
  
  <pre><code>var arr1 = ["series-3","series-5","series-6"];
  
  var arr2 = ["a3","a4","a5"];
  
  var arr3 = ["class a", "class b"];
  </code></pre>
  
  <p>What regex should I use to achieve this? 
  Can this be done without regex?</p>