title: Why does this regular expression match on the last group instead of the entire string?
body: <p>This is part of a larger regex, and the intention is for the entire string labeled <strong><em>test</em></strong> to match and fall into the capture group (with the exception of the first and last three parentheses).</p>
  
  <p>As written, my understanding is that the regex should capture a string between one opening parentheses <code>(</code> and three closing parentheses <code>)))</code>. </p>
  
  <p><strong>Regex:</strong><code>\(([^\)\)\)]*)\)\)\)[\s]*,?</code></p>
  
  <p><strong>Test:</strong><code>((Test_1, (3.7, 88, test,, str)), (Test_2, (1.9, 33, test,, str))) ,</code></p>
  
  <p>When used with Python's standard regex library, only <code>(Test_2, (1.9, 33, test,, str))) ,</code> is actually matching the regex instead of the entire string. I must be missing something here, but I'm having a hard time figuring out what that is and how to resolve it.</p>
  
  <pre><code>test=r"((Test_1, (3.7, 88, test,, str)), (Test_2, (1.9, 33, test,, str))) ,"
  re.compile(r"\(([^\)\)\)]*)\)\)\)[\s]*,?").search(test).group(0)
  &gt;&gt;&gt; '(Test_2, (1.9, 33, test,, str))) ,'
  </code></pre>