Apex › Storage & databases

Aho-Corasick multi-pattern matching

Find every occurrence of many patterns in one pass. The automaton is a trie of the dictionary plus failure links; step through the text and watch the state follow a child edge when it can and jump a failure link when it can’t, lighting up matches as whole patterns complete — the engine behind fgrep and intrusion detection.

More in Storage & databases