Quote:
Originally Posted by Vempele
The following in RegexPokerstars.cs should be enough to get PS import working (except for Zoom, which requires extra trickery to find the button - in multiple files IIRC so I'll see about it tomorrow):
Code:
// PokerStars Game #15672075601: Hold'em No Limit ($0.01/$0.02) - 2008/03/01 - 20:54:25 (ET)
// PokerStars Game #20436181992: 5 Card Draw No Limit (5/10) - 2008/09/15 18:35:48 ET
public static Regex regHandStart = new Regex("PokerStars (Zoom )?(Game|Hand) #(?<hand_external_id>[\\w\\s]+): (?<hand_structure>[\\w\\s'-]+) \\((?<hand_stakes>[0-9\\$€\\.,/]+)(?<curr>\\s\\w*)?\\) - (?<hand_date>[\\w\\s/]+)( -)? (?<hand_hour>[\\w\\s:()]+)(\\[(?<hand_date_et>[\\w\\s/]+)( -)? (?<hand_hour_et>[\\w\\s:()]+)\\])?$", RegexOptions.Compiled);
//PokerStars Game #23048757602: 8-Game (Hold'em Limit, $1/$2) - 2008/12/18 23:09:28 ET
//PokerStars Game #23048810379: 8-Game (Omaha Hi/Lo Limit, $1/$2) - 2008/12/18 23:11:53 ET
//PokerStars Game #23049348280: 8-Game (Triple Draw 2-7 Lowball Limit, $1/$2) - 2008/12/18 23:37:35 ET
public static Regex regMixedGameHandStart = new Regex("PokerStars (Zoom )?(Game|Hand) #(?<hand_external_id>[\\w\\s]+): (?<mixed_game>[\\w\\s-.]+) \\((?<hand_structure>[\\w\\s'-]+), (?<hand_stakes>[0-9\\$€\\.,/]+)(?<curr>\\s\\w+)?\\) - (?<hand_date>[\\w\\s/]+)( -)? (?<hand_hour>[\\w\\s:()]+)(\\[(?<hand_date_et>[\\w\\s/]+)( -)? (?<hand_hour_et>[\\w\\s:()]+)\\])?$", RegexOptions.Compiled);
// PokerStars Game #15936161526: Tournament #80484561, $0.50+$0.00 Hold'em No Limit - Level I (10/20) - 2008/03/12 - 20:00:00 (ET)
public static Regex regTHandStart = new Regex("PokerStars (Zoom )?(Game|Hand) #(?<hand_external_id>[\\w\\s]+): Tournament #(?<t_external_id>[\\w\\s]+), (?<hand_structure>[\\w\\s$+.'-]+) - Level ([\\w]+) \\((?<hand_stakes>[0-9\\$€\\.,/]+)\\) - (?<hand_date>[\\w\\s/]+)( -)? (?<hand_hour>[\\w\\s:()]+)(\\[(?<hand_date_et>[\\w\\s/]+)( -)? (?<hand_hour_et>[\\w\\s:()]+)\\])?$", RegexOptions.Compiled);
Also, the various MuckedHand regexes for both PS and FTP need fixing in that the latter part of
Code:
(?<player_name>[^\r\n]+) (\(button\) |\(small blind\) |\(big blind\) )
is useless - player_name still ends up as "some_player (button) (small blind)". I solved this with a separate function, but it'd be cleaner to fix the regexes themselves.
I know this post is super old, but I just thought I'd mention that the regular expression you have provided here failed when I tried to run the program using Visual Studio 2012.
turning all the double back slashes into single back slashes did the trick.