go to previous page   go to home page   go to next page

Answer:

([pP]ork|[lL]amb])chops?

([pP]orkchops?)|([lL]amb]chops?)

Browser Note: the subexpression [lL] is a lower 'l' followed by an uppercase 'L' enclosed in brackets. This is hard to see in some web browsers.


Long Loops

complicated finite automaton

A subexpression placed in parentheses in a regular expression corresponds to a group of connected states in an automaton. If the parenthesized subexpression is followed by a star or plus, then there is a transition in the automaton that loops back to a previous state of the group. The above automaton corresponds to the regular expression ([A-C][0-3][D-F])+


QUESTION 9:

Is the string A3DB0F accepted by the automaton?