Skip to content

Commit

Permalink
Modification of the parsing regular expressions to handle both hh:mm:…
Browse files Browse the repository at this point in the history
…ss and hh:mm timestamp format in IRC log files
  • Loading branch information
zertrin committed Nov 13, 2012
1 parent 6237f0b commit 7c82c8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rezoirclogs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def __new__(cls, value):


_regex = [
(re.compile(r"(\d\d:\d\d) <%s> ?(.*)" % _nick_regex), 'normal'),
(re.compile(r"(\d\d:\d\d) *\* %s ?(.*)" % _nick_regex), 'me'),
(re.compile(r"(\d\d:\d\d) -!- %s ?(.*)" % _nick_regex), 'status'),
(re.compile(r"(\d\d:\d\d(?::\d\d)??) <%s> ?(.*)" % _nick_regex), 'normal'),
(re.compile(r"(\d\d:\d\d(?::\d\d)??) *\* %s ?(.*)" % _nick_regex), 'me'),
(re.compile(r"(\d\d:\d\d(?::\d\d)??) -!- %s ?(.*)" % _nick_regex), 'status'),
]

def populate(self):
Expand Down

0 comments on commit 7c82c8b

Please sign in to comment.