“
$/ = ".\n";
while (<>) {
next if !s/\b([a-z]+)((?:\s|<[^>]+>)+)(\1\b)/\e[7m$1\e[m$2\e[7m$3\e[m/ig;
s/^(?:[^\e]*\n)+//mg; # Remove any unmarked lines.
s/^/$ARGV: /mg; # Ensure lines begin with filename.
print;
}
”
”
Jeffrey E.F. Friedl (Mastering Regular Expressions: Understand Your Data and Be More Productive)
“
if len( sys.argv) = = 2: filename = sys.argv[ 1]
”
”
T.J. O'Connor (Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers)