Test, validate and match regular expressions
This regex detects secrets and credentials in configuration files, source code, and data structures. It matches key-value pairs where the key contains 'key', 'secret', or 'token' (e.g., api_key, client_secret, authToken) followed by a value, excluding common literals like null/true/false. It also captures 'Authorization' header values containing schemes like Bearer or Basic with their credentials. Useful for security scanning, secret auditing, and preventing accidental credential exposure in version control.