Exam-style question
Try this first
Which pair of strings are both recognised by the regular expression colou?r?.
- A.color and colour
- B.colouur and colour
- C.colo and colour
- D.color and colouur
Model answer
What a good answer should say
- color and colour
Explanation
Why this works
The ? means that the preceding character, u, occurs zero or one time.
Therefore, both color and colour are recognised.
Common mistake
No common mistake is linked to this question yet.
