A regular expression question type allows you to set a specific format or pattern of responses, e.g. dates. Respondents will be prompt to input responses according to the format specified.
Regular expression question outputs
Regular expression questions produce the following outputs:
- Word cloud showing the most frequent words (if the question involves text inputs).
- The full list of text responses.
- The analysis of text length (characters) that includes the descriptive statistics for the length of responses in characters.
- The analysis of text length (words) that includes the descriptive statistics for length of responses in words.
- The number of participants who saw the question.
Setting up a regular expression question
Follow these steps to set up a regular expression question:
1. Add question
NNavigate to the Add questions tab and click on the button at the bottom of the page.
On the Add or import questions pop-out, select the Add a new question tab and click on the question card to add it to the experiment.
2. Edit question options
Once you add the question, you can adjust the following settings:
- Insert the question text in the text box. You can also include formatting and images.
- Fill in the answer regexp with regular expression to specify the format of responses. In this example,
[0-9]represent the responses need to be numerical in the range between 0 and 9. The regexp code can be tested on regex101.com.
- Tick the required question? checkbox if you would like respondents to answer this question before proceeding further.