title: Splitting comma separated regex input string
body: <p>Given a comma separated regex string, for example:</p>
  
  <pre><code>^test\d+.txt$, ^[-,0-9]+$ // provided by user
  </code></pre>
  
  <p>I want to split it by a comma and get</p>
  
  <ul>
  <li>^test\d+.txt$</li>
  <li>^[-,0-9]+$</li>
  </ul>
  
  <p>instead of</p>
  
  <ul>
  <li>^test\d+.txt$</li>
  <li>^[-</li>
  <li>0-9]+$</li>
  </ul>
  
  <p>How can I achieve this?</p>