title: regular expression to parse LDAP dn
body: <p>I have the following string:</p>
  
  <pre><code>cn=abcd,cn=groups,dc=domain,dc=com
  </code></pre>
  
  <p>Can a regular expression be used here to extract the string after the first <code>cn=</code> and before the first <code>,</code>? In the example above the answer should be <code>abcd</code>. </p>