title: PHP Regex for multiple parantheses
body: <p>I have a string which looks like this: </p>
  
  <pre><code>43.3433443 25.3434334), (43.32424432 25.435345345, 43.21313123, 25.32432423423), (43.123123123 25.344234234, 43.1234123123 25.23213123))
  </code></pre>
  
  <p>I need to extract everything that is between ( and ) as well as ( and )) with preg_match_all</p>
  
  <p>I have the following regex, which works for extracting everything between ( and ) but not ( and )) </p>
  
  <pre><code>preg_match_all('/\), \(([A-Za-z0-9., ]+?)\)/', $data[$x], $inner);
  </code></pre>
  
  <p>I've tried using:</p>
  
  <pre><code>preg_match_all('/\), \(([A-Za-z0-9., ]+?)\)|\), \(([A-Za-z0-9., ]+?)\)\)/', $data[$x], $inner);
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>preg_match_all('/(?=\), \(([A-Za-z0-9., ]+?)\))(?=\), \(([A-Za-z0-9., ]+?)\)\))/', $data[$x], $inner);
  </code></pre>
  
  <p>But none of them have worked. How would I go about to include both cases?</p>
  
  <p>Thank you.</p>
  
  <p>UPDATE:</p>
  
  <p>I forgot to mention, the string contains numbers within multiple starting and ending parentheses that I don't want, i.e. two parantheses ---> (( numbers here ))) &lt;---3 parantheses</p>