Skip to content

Instantly share code, notes, and snippets.

@EvanTheB
Created September 2, 2015 04:49
Show Gist options
  • Save EvanTheB/32acfc27874fcffe2c75 to your computer and use it in GitHub Desktop.
Save EvanTheB/32acfc27874fcffe2c75 to your computer and use it in GitHub Desktop.
import re
with open("raw.log") as f:
log = f.read()
fil = re.compile(":(.*)!.*:(.*)")
lines = []
for l in log.split("\n"):
if "PRIVMSG #" not in l:
continue
m = fil.search(l)
if m is not None:
print m.group(1), m.group(2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment