Tutorial by Examples

NFA

A NFA (Nondeterministic Finite Automaton) engine is driven by the pattern. Principle The regex pattern is parsed into a tree. The current position pointer is set to the start of the input string, and a match is attempted at this position. If the match fais, the position is incremented to the ne...

DFA

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...

Page 1 of 1