title: Is there a way to match only top level parentheses with regex?
body: <p>With Javascript, suppose I have a string like <code>(1)(((2)(3))4)</code>, can I get a regex to match just <code>(1)</code> and <code>(((2)(3))4)</code>, or do I need to do something more complicated?</p>
  
  <p>Ideally the regex would return <code>["((2)(3))","4"]</code> if you searched <code>((2)(3))4</code>. Actually that's really a requirement. The point is to group things into the chunks that need to be worked on first, like the way parentheses work in math.</p>