From f908d8a11a6556f28409e60863215c8daf444e60 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 11 Jan 2012 11:03:20 +0100 Subject: [PATCH] Fix regular expression. Support votenames longer than one line (in fact, support votenames up to two lines long). Signed-off-by: Thomas Hochstein --- uvvote.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uvvote.pl b/uvvote.pl index 836903a..67754d2 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -241,8 +241,9 @@ sub process_vote { } # correct voting? - if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*$/m) { + if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n(.*?[\t ]+(\S+.+)\s*$)?/m) { $voting = $1; + $voting .= " $3" if defined($3); push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/); } else { push (@errors, 'NoVoting');