Regex fix for Fulltilt player names

"Seat 7: moletrapper collected ($2.50)"
vs
"Seat 7: moletrapper ($2.50)"

The regex update should match the second and not the first.
This commit is contained in:
Worros 2010-01-28 01:44:14 +08:00
parent cd05c1da48
commit a9f2a261d4

View File

@ -65,8 +65,8 @@ class Fulltilt(HandHistoryConverter):
(\s\((?P<TURBO>Turbo)\))?)|(?P<UNREADABLE_INFO>.+))
''', re.VERBOSE)
re_Button = re.compile('^The button is in seat #(?P<BUTTON>\d+)', re.MULTILINE)
re_PlayerInfo = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.*) \(\$(?P<CASH>[,.0-9]+)\)$', re.MULTILINE)
re_TourneyPlayerInfo = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.*) \(\$?(?P<CASH>[,.0-9]+)\)(, is sitting out)?$', re.MULTILINE)
re_PlayerInfo = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.*) (?! collected )?\(\$(?P<CASH>[,.0-9]+)\)$', re.MULTILINE)
re_TourneyPlayerInfo = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.*) (?! collected )?\(\$?(?P<CASH>[,.0-9]+)\)(, is sitting out)?$', re.MULTILINE)
re_Board = re.compile(r"\[(?P<CARDS>.+)\]")
#static regex for tourney purpose
@ -264,8 +264,7 @@ class Fulltilt(HandHistoryConverter):
m = self.re_TourneyPlayerInfo.finditer(hand.handText)
for a in m:
if not self.re_Collected.search(a.group('PNAME')):
hand.addPlayer(int(a.group('SEAT')), a.group('PNAME'), a.group('CASH'))
hand.addPlayer(int(a.group('SEAT')), a.group('PNAME'), a.group('CASH'))
def markStreets(self, hand):
# PREFLOP = ** Dealing down cards **