FTP: Make re_SummarySitout ungreedy

The line

Seat 5: evv888 (button) is sitting out

Was crashing as (button) was becoming part of the player name,

Made the name match ungreedy, and allowed (button) as optional.
This commit is contained in:
Worros 2011-01-29 03:17:55 +08:00
parent 25d0c36022
commit e26abfeb71

View File

@ -105,7 +105,7 @@ class Fulltilt(HandHistoryConverter):
''' % substitutions, 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>.{2,15}) \([%(LS)s]?(?P<CASH>[%(NUM)s]+)\)(?P<SITOUT>, is sitting out)?$' % substitutions, re.MULTILINE)
re_SummarySitout = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.{2,15}) is sitting out?$' % substitutions, re.MULTILINE)
re_SummarySitout = re.compile('Seat (?P<SEAT>[0-9]+): (?P<PNAME>.{2,15}?) (\(button\) )?is sitting out?$' % substitutions, re.MULTILINE)
re_Board = re.compile(r"\[(?P<CARDS>.+)\]")
#static regex for tourney purpose