Understanding Cisco Cybersecurity Operations Fundamentals (CBROPS) — Question 310
Which regular expression matches "color" and "colour"?
Answer options
- A. colo?ur
- B. col[0גˆ’8]+our
- C. colou?r
- D. col[0גˆ’9]+our
Correct answer: C
Explanation
The correct answer is C, 'colou?r', as it uses the '?' quantifier to denote that the 'u' is optional, thus matching both 'color' and 'colour'. Option A is incorrect because it has a similar structure but is not a standard way to represent the optional character. Options B and D are invalid as they use character classes with numbers that do not relate to the provided words.