Understanding Regular Expressions in the Quiz Questions
This is a guide on the basics of regular expressions and how to use them in quiz questions on VU Collaborate. Using regular expressions gives an instructor the ability to evaluate various combinations of student inputs to questions.
Related guides
- Quiz question converter - create a file to import questions
- Creating Questions in the Question Library
- Creating a Survey
What are Regular Expressions?
When creating quizzes in VU Collaborate, regular expressions give instructors grading some quiz questions the ability to evaluate responses against a set of acceptable values.
It is often convenient to use a regular expression instead of specifying a separate answer for each possibility to include:
- multiple possible answers
- common English spelling differences
- match the position at the beginning and the end of student answers
- etc
For example, if we want to allow the answers "gray" and "grey" to the question "What colour paint do we get when we mix black paint with white paint?", we could use the regular expression
gr[a|e]y
where the [a|e] part matches either a or e. Both gray and grey would be flagged as correct answers.
You can choose to use regular expressions in short answers, multi-short answers, arithmetic, significant figures, and fill-in-the-blank questions.
Step One: Create a quiz question
To use regular expressions in a quiz, select and create one of the questions below:
- Creating Short Answer Questions
- Creating Multi-Short Answer Questions
- Creating a Fill in the Blanks Question
- Creating Arithmetic Questions
- Creating Significant Figures Questions
Step Two: Select the Regular Expression option
When entering your question details such as answers, you are given the option to use Regular Expressions.
Option 1: For Short Answer question type.
Select Regular Expression from the dropdown answer menu.
Option 2: For multi-short answers, arithmetic, significant figures, and fill-in-the-blanks question types.
Select Regular Expression from the Evaluation field.
Step Three: Enter answer details and examples
Below are some examples of how Regular Expressions can be used when building your quiz questions.