Build, test, and debug regular expressions
This regex extracts the Common Name (CN) value from an LDAP Distinguished Name (DN). It captures the text immediately following "CN=" up to the first unescaped comma, ensuring that commas escaped with a backslash within the name are properly ignored. It is particularly useful in Active Directory data processing, directory synchronization, and identity management tasks.