Skip to content

Instantly share code, notes, and snippets.

@xiagu
Created June 13, 2015 02:22
Show Gist options
  • Save xiagu/4a6ad7d077634f31ebe5 to your computer and use it in GitHub Desktop.
Save xiagu/4a6ad7d077634f31ebe5 to your computer and use it in GitHub Desktop.
Junk parser
MODE = /([+%@&~!]?)/
NICK = /([\w\-\\\[\]\{\}\^\`\|]+)/
DATE_REGEXP = /(\d\d\d\d \d\d \d\d\[\d\d:\d\d\])/
# Crappy but worked for examples, could definitely be improved
USER_AT_HOST = /\(\w+@[^)]+\)/
JUNK = /#{DATE_REGEXP} \* #{MODE}#{NICK} (sets mode:|is now known as|(#{USER_AT_HOST} (has joined|Quit))).*$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment