Test, validate and match regular expressions
This regex extracts the value of the CN (Common Name) field from an LDAP distinguished name when it is followed by an O (Organization) attribute. It uses lookarounds to find 'CN=' at the start of a line and captures everything up to the next comma and 'o', allowing optional whitespace. Useful for parsing directory entries or configuration data.