title: Do not match if nothing exists between optional parenthesis
body: <p>I'm attempting to parse group names from /etc/security/login-access.conf. We have a mixed environment of LDAP &amp; AD machines. AD groups are encapsulated with parenthesis ().</p>
  <p>I have the following regex that works to extract only the group name, however the only problem I am having with it is there is routinely a 'null' group and the regex returns a null &amp; the ) characters:</p>
  <p>Current regex:</p>
  <pre><code>/(?&lt;=\+\s:\s[@\(])(.*?)(?=[\)]?\s:)/
  </code></pre>
  <p>Sample /etc/security/login-access.conf:</p>
  <pre><code>+ : @ldapgroup1 : ALL
  + : @ldapgroup2 : ALL
  + : (@adgroup1) : ALL
  + : (@adgroup2) : ALL
  + : () : ALL          # &lt;---This is the problematic entry.
  </code></pre>
  <p>I'm not sure if or how to tune the regex to ignore an entry that contains nothing between the parenthesis. Any help is appreciated.</p>