Regular expression


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.

Respondent view

Respondent view of regular expression question

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.
Regular expression question outputs

Remove participants directly

Once you see a nonsensical response, you can directly remove the response from the outputs by hovering your mouse over the response you want to remove, right-click, and click on Exclude this respondent from the report.

Remove response directly

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 Add question 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 Regular expression question card to add it to the experiment.

Adding the regular expression question

2. Edit question options

Once you add the question, you can adjust the following settings:

  1. Insert the question text in the text box. You can also include formatting and images.
  2. 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.
  3. Tick the required question? checkbox if you would like respondents to answer this question before proceeding further.
Regular expression question setup