ExamGecko
Question list
Search
Search

Related questions











Question 115 - 200-201 discussion

Report
Export

Which regular expression matches 'color' and 'colour'?

A.

colo?ur

Answers
A.

colo?ur

B.

col[08]+our

Answers
B.

col[08]+our

C.

colou?r

Answers
C.

colou?r

D.

col[09]+our

Answers
D.

col[09]+our

Suggested answer: A

Explanation:

The regular expression that matches both ''color'' and ''colour'' iscolo?ur. In this expression, the?denotes that the preceding characteruis optional, meaning it may appear zero or one time. This allows the expression to match both the American spelling ''color'' and the British spelling ''colour''.

asked 07/10/2024
Ali Abbas
28 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first