title: How to remove all characters not inside parentheses using regex
body: <p>I have a string that contains commas both inside and outside of a parentheses block:
      <code>foo(bat,foo),bat</code></p>
  
  <p>How can I use regex to replace the comma not inside parentheses?
                                                                    <code>foo(bat,foo)bat</code></p>