- Problem:
- Search through an irc log file for all comments I have made containing a perl one-liner.
- Solution:
- Perl one-liners always contain perl -e (in some form or another), so match that along with the common regular expression anchors, //, then make sure that I'm the one that said the one-liner by anchoring on the timestamp at the beginning of each line.
Sample line: 14:16 @ greenfly| tail -f /var/log/mail.log | perl -ne 'print scalar((split)[6]),"\n" if(/imapd.*LOGIN/);' Parser: egrep "^..:.. [@%+]? *greenfly.*perl -.?e.*/.*/" .irssi/irclogs/ars/#linux.log