title: regular expression to get text between brackets that have text between brackets
body: <p>After trying 10 times to rewrite this question to be accepted , i have a small text that have text between brackets, i want to extract that text so i wrote this expression :</p>
  
  <pre><code>/(\([^\)]+\))/i
  </code></pre>
  
  <p>but this only extracts text between first <code>(</code> and last <code>)</code> ignoring the rest of text
  so is there any way to extract full text like :</p>
  
  <pre><code>i want(to) extract this text
  </code></pre>
  
  <p>from :</p>
  
  <pre><code>this is the text that (i want(to) extract this text) from
  </code></pre>
  
  <p>there might be more than one bracket enclosed sub-text .</p>
  
  <p>Thanks</p>
  
  <p><strong>EDIT</strong>
  Found this :</p>
  
  <pre><code>preg_match_all("/\((([^()]*|(?R))*)\)/", $rejoin, $matches);
  </code></pre>
  
  <p>very usefull from the link provided in the accepted answer</p>