This regex will match private keys, encrypted or unencrypted.
Matches:
- -----BEGIN ENCRYPTED PRIVATE KEY-----
- -----BEGIN PRIVATE KEY-----
- -----BEGIN RSA PRIVATE KEY-----
- -----BEGIN OPENSSH PRIVATE KEY-----
- ---- BEGIN SSH2 PUBLIC KEY ----
Submitted by anonymous - 6 years ago