Which of the following strings would match the regular expression: p+[3-5]*[xyz]?
p+[3-5]*[xyz] = p+(3+4+5)*(x+y+z)
Since, p has to be present as the first character of each string,
I. p443y -> matched
Il. p6y -> not matched since 6 cannot used .
III. 3xyz -> not matched Strings must start with p.
IV. p35z -> matched
V. p353535x -> matched
Vl. ppp5 -> not matched Strings must end with x, or y, or z.
p+[3-5]*[xyz] = p+(3+4+5)*(x+y+z) how?