ITPEC IP April 2019 Question 29
ITPEC IP April 2019 — Question 29 of 100
Only string I matches the wildcard expression. For A.text against *A*.te??, the first * can be empty, A matches A, the second * can also be empty, .te matches literally, and the two question marks match x and t. Each ? must consume exactly one character.
Answer (a)
Why not others:
- II ends with only one character after .te, so it cannot satisfy both question marks
- III has no literal .te sequence after its matched A
- IV likewise cannot align a literal .te after A with exactly two final characters
Key rule: * matches any sequence including empty, while every ? matches exactly one character; fixed characters and punctuation must appear in order.
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.