From 1770190d10dd7008b69253d654c83ea53b5a7b15 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 10 Feb 2012 01:31:37 +0100 Subject: [PATCH] Fix CCBS parsing of nicks with spaces in them. --- parse/parse-ccbs-tournament.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse/parse-ccbs-tournament.pl b/parse/parse-ccbs-tournament.pl index 29aadf9..e5ed36b 100644 --- a/parse/parse-ccbs-tournament.pl +++ b/parse/parse-ccbs-tournament.pl @@ -55,7 +55,7 @@ while (<>) { } # Player rankings - if (/^ \s*
  • ( \d+) \. \s* place: \s* ( \S+ ) (?: \s* \( ( [A-Z]+ ) \) )? <\/a> , \s* with \s* ( \d+ ) \s* points/x) { + if (/^ \s*
  • ( \d+) \. \s* place: \s* ( .*? ) (?: \s* \( ( [A-Z]+ ) \) )? <\/a> , \s* with \s* ( \d+ ) \s* points/x) { my ($ranking, $nick, $code, $points) = ($1, $2, $3, $4); # Woot, evil @@ -128,7 +128,7 @@ while (<>) { } # Player's results (header) - if (/^\s* (\S+) (?: \s* \( ( [A-Z]+ ) \) )? <\/a> \s*$/x) { + if (/^\s* (.*?) (?: \s* \( ( [A-Z]+ ) \) )? <\/a> \s*$/x) { $player = $1; printf "INSERT INTO roundparticipation (tournament, round, parallel, player, position) VALUES (\n"; -- 2.39.2