Replace all occurences of ('content') from first bracket - ( to VERY last )?
<p>I have a string that may be: <code>Hello (hiii(1998 overhill) hpp) there</code>.
I want to strip to remove the brackets and content from within but keeping the words <code>Hello there</code>.</p>

<p>Below is my code but it removes the first part: <code>(hiii(1998 overhill)</code> leaving <code>hpp)</code> behind.</p>

<pre><code>myString = "Hello (hiii(1998 overhill) hpp) there";
myString = myString.replace(/ \([^)]*\)/g, '');
</code></pre>

<p>With that said, i want it to do this for all occurrences which is why i supplied the <code>/g</code> but how do i do it for the last occurrence of (content) hi) also? For future reference.</p>

<p>So if i have <code>"Hello (ddd(dog) kk) and hello (pineapple(g)"</code> is it possible to cut out the last bracket so im left with: <code>Hello (ddd(dog) kk) and hello</code> removing the <code>(pineapple(g)</code>?</p>

<p>Thanks!</p>