Question Set 5
Q17. Consider the pattern
var pattern1 = /[1-9]{2}/;
Consider the following four strings
string1[0] = "12"; string1[1] = "20"; string1[2] = "23"; string1[3] = "9d";
Which of these strings do not match the pattern.
A. string1[3]
B. string1[1]
C. string1[3] and string1[1]
D. string1[0] and string1[2]
Q18. Consider the pattern
var pattern1 = /[^aeiou]{1}[^aeiou]{3}[aeiou]{1}$/;
Consider the following four strings
string1[0] = "intme";
string1[1] = "isste";
string1[2] = "glpxe";
string1[3] = "ydnmi";
Which of these strings match pattern1.
A. string1[0] and string1[1] and string1[2]
B. string1[0] and string1[1]
C. string1[3] and string1[2]
D. string1[0] and string1[2]