Build, test, and debug regular expressions
This regular expression is designed to extract the Common Name (CN) value from an LDAP Distinguished Name (DN). It matches strings starting with 'CN=', captures the subsequent alphanumeric characters and hyphens into a group, and ignores the rest of the string. It is commonly used in identity management and Active Directory integrations to parse user or group identifiers.