From d04e5e1a23369df7396ed21bef85b499449c179c Mon Sep 17 00:00:00 2001 From: Worros Date: Fri, 20 Aug 2010 20:09:44 +0800 Subject: [PATCH] HHC: doco for compilePlayerRegexes --- pyfpdb/HandHistoryConverter.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pyfpdb/HandHistoryConverter.py b/pyfpdb/HandHistoryConverter.py index 39ff3bf7..a521f248 100644 --- a/pyfpdb/HandHistoryConverter.py +++ b/pyfpdb/HandHistoryConverter.py @@ -367,7 +367,25 @@ or None if we fail to get the info """ """ def compilePlayerRegexs(self): abstract - """Compile dynamic regexes -- these explicitly match known player names and must be updated if a new player joins""" + """Compile dynamic regexes -- compile player dependent regexes. + + Depending on the ambiguity of lines you may need to match, and the complexity of + player names - we found that we needed to recompile some regexes for player actions so that they actually contained the player names. + + eg. + We need to match the ante line: + antes $1.00 + + But is actually named + + YesI antes $4000 - A perfectly legal playername + + Giving: + + YesI antes $4000 antes $1.00 + + Which without care in your regexes most people would match 'YesI' and not 'YesI antes $4000' + """ # Needs to return a MatchObject with group names identifying the streets into the Hand object # so groups are called by street names 'PREFLOP', 'FLOP', 'STREET2' etc