Skip to content
Related Articles

Related Articles

UGC-NET | UGC NET CS 2017 Jan – II | Question 31

Improve Article
Save Article
Like Article
  • Last Updated : 26 Mar, 2018

Which of the following strings would match the regular expression :
p+ [3 – 5]∗ [xyz]?
I. p443y
II. p6y
III. 3xyz
IV. p35z
V. p353535x
VI. ppp5
(A) I, III and VI only
(B) IV, V and VI only
(C) II, IV and V only
(D) I, IV and V only


Answer: (D)

Explanation:

I. p443y  valid    
II. p6y   invalid 
III. 3xyz  invalid  
IV. p35z     valid
V. p353535x  valid
VI. ppp5     invalid

So, option (D) is correct.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!