Skip to content

Aho–Corasick / exact text matching

One dictionary.
One scan.
Every match.

Match a dictionary against text with grapheme precision and slice-ready ranges. Follow every transition, fallback, and suffix match.

he · she · his · hers
ushers → she, he
ushers → hers
search('ushers')
{ pattern: 'she', start: 1, end: 4 }
text.slice(1, 4) === 'she'

These docs describe the unreleased v3 workspace. MIT · SonOfMagic · BrunoRB/ahocorasick

MIT · Based on BrunoRB/ahocorasick