title: javascript parse parenthesis
body: <p>I need parse a string inside a parenthesis, which looks like (A, B, C), where A, B, and C are string that can contain any legal JavaScript code. For example, B might be a very long string with nested structures similar to (A, B, C). What would be the best way to parse such a string?   </p>
  
  <p>An example of the string to parser is invoking a function: </p>
  
  <p>func( parameter 1, parameter 2, parameter 3)</p>
  
  <p>where all the three parameters could be other function definitions.</p>