1. A method of direct construction of a minimal deterministic finite state machine corresponding to a regular expression, comprising: providing a regular expression represented as a regular expression tree with nodes of operators and leaves of elementary character transitions; traversing the regular expression tree recursively to build minimal finite state automata (FSAs) corresponding to the branches of the tree, wherein the FSAs end in a specified tail automaton.