A DFA (Deterministic Finite Automaton) engine is driven by the input.
Principle
The algorithm scans through the input string once, and remembers all possible paths in the regex which could match. For instance, when an alternation is encountered in the pattern, two new paths are created and attem...