Does [fr]*og
match "frog" ?
Yes. As well as "fog", "rog", "rfrog, "og", "fffrog", . . .
A Kleene star in a regular expression corresponds to a loop in an automaton.
The above automaton corresponds to [fr]*og
.
Note that either character 'f' or character 'r' can be picked each time the transition is taken from state q0 back to state q0.
Write a RE that matches strings of one or more zeros and ones, in any order.