Example
This finite state automaton recognizes the set of all variable names in a particular programming language. In this case, variable names must start with a letter, can be followed by letters, digits, and the underscore character. However, a variable name cannot have more than one underscore in a row. It may also not end with an underscore.