diff 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
line wrap: on
line diff
--- a/src/constants.h	Wed Oct 05 14:23:23 2016 +0200
+++ b/src/constants.h	Wed Oct 05 14:24:09 2016 +0200
@@ -65,11 +65,11 @@
 
 /**
  * @brief The pattern used to match a multiple choice answer. */
-#define CHOICE_PATTERN "\"(.*)\",(?<num>\\d+)?,(?<percent>\\d{0,3}\\.{0,1}\\d*)?"
+#define CHOICE_PATTERN "\"([^\"]*?)\",(?<num>\\d+)?,(?<percent>\\d{0,3}\\.{0,1}\\d*)?", QRegularExpression::MultilineOption
 
 /**
  * @brief The pattern used to match an unfilled choice answer. */
-#define CHOICE_UNFILLED_PATTERN "\"([^\"]*)\"[,]{0,1}"
+#define CHOICE_UNFILLED_PATTERN "\"([^\"]*?)\"[,]{0,1}", QRegularExpression::MultilineOption
 
 /**
  * @brief The pattern used to match a free text answer. */
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)