(1) Suggestions on how to construct such a regex?
Very difficult to avoid false positives because the last line of the key may only be a few characters.
(2) Suggestions on how to tackle the problem differently?
Text::Diff will happily work on arrays/scalars as well as files, so pre-process your inputs to remove any private keys before doing the diff - that way they are easy to identify.
In reply to Re: regex for identifying encrypted text
by hippo
in thread regex for identifying encrypted text
by skendric
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |