1.

What does “X?” do regular expression operator?(a) Matches zero or more capital X’s.(b) Matches no or one occurence of the capital letter X.(c) Matches one or more capital X’s.(d) All of the mentionedI had been asked this question in an interview for job.This intriguing question originated from Regular Expression in UNIX in division Regular Expressions and Languages of Automata Theory

Answer»

Right choice is (b) MATCHES no or one OCCURENCE of the capital LETTER X.

For explanation I would say: There are manyother common regular expression operators like $, ^, ETC. Which have their own respective purposes.



Discussion

No Comment Found

Related InterviewSolutions