1.

Are the given two patterns equivalent?(a) gray|grey(b) gr(a|e)y(c) yes(d) noI have been asked this question in an online quiz.This key question is from Converting Regular Expressions to Automata topic in chapter Regular Expressions and Languages of Automata Theory

Answer»

The correct choice is (a) gray|grey

To ELABORATE: PARANTHESIS can be used to DEFINE the scope and precedence of OPERATORS. Thus, both the expression represents the same PATTERN.



Discussion

No Comment Found

Related InterviewSolutions