Mercurial > clickerconvert
comparison src/constants.h @ 77:9412d60c8ac1
Handle multiline choices
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 05 Oct 2016 14:24:09 +0200 |
parents | 1e6e7699f0b8 |
children | f230ed9022e0 |
comparison
equal
deleted
inserted
replaced
76:1e6e7699f0b8 | 77:9412d60c8ac1 |
---|---|
63 * @brief Identifiying line that shows a question is a choice question. */ | 63 * @brief Identifiying line that shows a question is a choice question. */ |
64 #define CHOICE_IDENTIFIER "Answer,Votes,Percent" | 64 #define CHOICE_IDENTIFIER "Answer,Votes,Percent" |
65 | 65 |
66 /** | 66 /** |
67 * @brief The pattern used to match a multiple choice answer. */ | 67 * @brief The pattern used to match a multiple choice answer. */ |
68 #define CHOICE_PATTERN "\"(.*)\",(?<num>\\d+)?,(?<percent>\\d{0,3}\\.{0,1}\\d*)?" | 68 #define CHOICE_PATTERN "\"([^\"]*?)\",(?<num>\\d+)?,(?<percent>\\d{0,3}\\.{0,1}\\d*)?", QRegularExpression::MultilineOption |
69 | 69 |
70 /** | 70 /** |
71 * @brief The pattern used to match an unfilled choice answer. */ | 71 * @brief The pattern used to match an unfilled choice answer. */ |
72 #define CHOICE_UNFILLED_PATTERN "\"([^\"]*)\"[,]{0,1}" | 72 #define CHOICE_UNFILLED_PATTERN "\"([^\"]*?)\"[,]{0,1}", QRegularExpression::MultilineOption |
73 | 73 |
74 /** | 74 /** |
75 * @brief The pattern used to match a free text answer. */ | 75 * @brief The pattern used to match a free text answer. */ |
76 #define FREETXT_PATTERN "\"([^\"]*)\"?", QRegularExpression::MultilineOption | 76 #define FREETXT_PATTERN "\"([^\"]*)\"?", QRegularExpression::MultilineOption |
77 | 77 |