Non-greedy matching for votestrings. A single choice on a ballot has this format: #1 [ ] This or that The regexp in uvvote.pl's process_vote() will match and extract what's beetwen "[" and "]". But if "This or that" contains a "]", the match will be too greedy: #1 [ ] This [or that] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <- match Fix that by using a non-greedy operator. Signed-off-by: Thomas Hochstein <thh@thh.name>
Merge branch 'thh-pickfromupstream' into next * thh-pickfromupstream: Fix whitespace and typo. Update documentation to 4.12. Add correct timestamp to mbox when processing. Don't remove empty mailbox files/maildirs. Fix UVreadmail.pm Add option to compare ballot to sample ballot. Documentation: Add votename to UVmenu.
Add option to compare ballot to sample ballot. It may be desriable to compare a ballot to a sample ballot when checking votes. * Add options "diff" and "sampleballotfile" to usevote.cfg an UVconfig.pm * Add menu option to UVmenu.pm Picked from upstream. Signed-off-by: Thomas Hochstein <thh@inter.net>