Regular expressions are the essential tool to specify behavior of lexical analyzers. This section introduces elementary regular expressions which relate to single transitions in DFAs. Elementary compositions, i.e. concatenation, union and arbitrary repetition, are used to construct more complex expressions vom elementary expressions and other compositions.

The operations for union, intersection, complement, together with the Universe DFA and the empty DFA for an algebraic structure. Further operations for pruning the set of matched lexemes, or pruning matching lexemes have been introduced. Operations based on the edit-distance open the door for fuzzy-matching regular expressions applying the Levenshtein or PseudoDamerau distance. The analysis motifs of strands in DNA is supported with \DNA and \RNA commands. The next chapter focusses on modes, i.e. the means to express the concurrent ‘lurking’ of patterns in the input stream.