title: remove empty parenthesis from expression
body: <p>I want to remove those parenthesis which are empty from expression in javascript regular expression. For e.g  <code>(() a and b)</code> -&gt; <code>( and b)</code>. It should also work for the case <code>( (  (  ()  )  )a and b)</code> -&gt; <code>(a and b)</code>. Basicaly it should remove unnecessary parenthesis from expression. I am writng reguar expression</p>
  <pre><code>expression.replace(/(\s)/,'');   
  </code></pre>
  <p>but this is not working. Can anyone help ?</p>