ITPEC IP April 2021 Question 1
ITPEC IP April 2021 — Question 1 of 100
The pattern matches XYX.YXY. Before the period, the X-and-asterisk segment requires an initial X followed by any sequence, including an empty one. After the period, Y?? requires exactly three characters: Y followed by any two single characters. XYX begins with X, and YXY has the required Y plus two characters.
Answer (c)
Why not others:
- (a) has XYY after the period, which does not begin with Y
- (b) has only two characters after the period
- (d) begins with Y rather than X
Key rule: An asterisk matches zero or more characters, while each question mark matches exactly one character.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official IP past-paper collection or Report an issue.