Regex Search Algorithms

read the post →

Upload a PDF or text file and see grep, ripgrep, and trigram-indexed search compete on your data — with real timing.

grep

Naive linear scan. Checks every byte of every section.

rg

Boyer-Moore skipping. Reads right-to-left, jumps on mismatch.

ngram

Trigram-indexed. Only checks candidate sections from posting lists.