From 0e4be93e5028eef2e1d28b526571efe574521052 Mon Sep 17 00:00:00 2001 From: Eric Blade Date: Sat, 31 Jul 2010 12:25:01 -0400 Subject: [PATCH] further update regexes for accounting problems with euro games --- pyfpdb/EverleafToFpdb.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 43448495..9da5966f 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -34,11 +34,11 @@ class Everleaf(HandHistoryConverter): # Static regexes re_SplitHands = re.compile(r"\n\n\n+") re_TailSplitHands = re.compile(r"(\n\n\n+)") - re_GameInfo = re.compile(ur"^(Blinds )?(?P[$€]?)(?P[.0-9]+)/(?:\$|€)?(?P[.0-9]+) (?PNL|PL|) ?(?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) + re_GameInfo = re.compile(ur"^(Blinds )?(?P[$€]?)(?P[.0-9]+)/[$€]?(?P[.0-9]+) (?PNL|PL|) ?(?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) #re.compile(ur"^(Blinds )?(?P\$| €|)(?P[.0-9]+)/(?:\$| €)?(?P[.0-9]+) (?PNL|PL|) ?(?P(Hold\'em|Omaha|7 Card Stud))", re.MULTILINE) re_HandInfo = re.compile(ur".*#(?P[0-9]+)\n.*\n(Blinds )?(?P[$€])?(?P[.0-9]+)/(?:[$€])?(?P[.0-9]+) (?P.*) - (?P\d\d\d\d/\d\d/\d\d - \d\d:\d\d:\d\d)\nTable (?P.+$)", re.MULTILINE) re_Button = re.compile(ur"^Seat (?P
[0-9]+)\.txt") @@ -50,11 +50,11 @@ class Everleaf(HandHistoryConverter): self.compiledPlayers = players player_re = "(?P" + "|".join(map(re.escape, players)) + ")" logging.debug("player_re: "+ player_re) - self.re_PostSB = re.compile(ur"^%s: posts small blind \[(?:\$| €|) (?P[.0-9]+)" % player_re, re.MULTILINE) - self.re_PostBB = re.compile(ur"^%s: posts big blind \[(?:\$| €|) (?P[.0-9]+)" % player_re, re.MULTILINE) - self.re_PostBoth = re.compile(ur"^%s: posts both blinds \[(?:\$| €|) (?P[.0-9]+)" % player_re, re.MULTILINE) - self.re_Antes = re.compile(ur"^%s: posts ante \[(?:\$| €|) (?P[.0-9]+)" % player_re, re.MULTILINE) - self.re_BringIn = re.compile(ur"^%s posts bring-in (?:\$| €|)(?P[.0-9]+)\." % player_re, re.MULTILINE) + self.re_PostSB = re.compile(ur"^%s: posts small blind \[[$€]? (?P[.0-9]+)" % player_re, re.MULTILINE) + self.re_PostBB = re.compile(ur"^%s: posts big blind \[[$€]? (?P[.0-9]+)" % player_re, re.MULTILINE) + self.re_PostBoth = re.compile(ur"^%s: posts both blinds \[[$€]? (?P[.0-9]+)" % player_re, re.MULTILINE) + self.re_Antes = re.compile(ur"^%s: posts ante \[[$€]? (?P[.0-9]+)" % player_re, re.MULTILINE) + self.re_BringIn = re.compile(ur"^%s posts bring-in [$€]? (?P[.0-9]+)\." % player_re, re.MULTILINE) self.re_HeroCards = re.compile(ur"^Dealt to %s \[ (?P.*) \]" % player_re, re.MULTILINE) # ^%s(?P: bets| checks| raises| calls| folds)(\s\[(?:\$| €|) (?P[.,\d]+) (USD|EURO|Chips)\])? self.re_Action = re.compile(ur"^%s(?P: bets| checks| raises| calls| folds)(\s\[(?:[$€]?) (?P[.,\d]+)\s?(USD|EURO|Chips|)\])?" % player_re, re.MULTILINE)