LFCS Exam QuestionsBrowse all questions from this exam

LFCS Exam - Question 60


What does the symbol within regular expressions represent?

Show Answer
Correct Answer: C

In regular expressions, the ? symbol is used to indicate that the preceding element or group should be matched zero or one times. This makes the preceding element or group optional, meaning it can occur either once or not at all.

Discussion

3 comments
Sign in to comment
Borbz
Feb 15, 2021

Correct question is "What does the ? symbol within regular expressions represent?"

StribOption: C
Jun 16, 2023

C. Match the preceding qualifier zero or one time. In regular expressions, the "?" symbol is used as a quantifier to indicate that the preceding element or group should be matched zero or one times. It makes the preceding element or group optional, meaning it can occur either once or not at all. Here are a few examples to illustrate the usage of the "?" symbol: Match "colour" or "color": colou?r This pattern matches both "colour" and "color." The "?" makes the "u" optional, allowing for both spellings.

rjo
Nov 13, 2020

What symbol?

Borbz
Feb 15, 2021

the symbol is ? the answer is correct. C.