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

Which regular expression matches "color" and "colour"?
A. col[0-9]+our
B. colo?ur
C. colou?r
D. ]a-z]{7}

cisco-exams

One thought on “Which regular expression matches "color" and "colour"?

  1. Correct.
    When using the ? it means Match 0 or 1 of the preceding token, effectively making it optional.
    Example
    colou?r would match color or colour (letter u being optional)

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.