title: Split string on newline and comma
body: <p>My input String is like </p>
  
  <pre><code>abc,def,wer,str
  </code></pre>
  
  <p>Currently its splitting  only on comma but in future it will contain both comma and newline.
  Current code as below: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$scope.memArray = $scope.memberList.split(",");</code></pre>
  </div>
  </div>
  </p>
  
  <p>In future I need to split on both comma and newline what should be the regex to split both on comma and newline.
  I tried - /,<em>\n</em>\ but its not working.</p>