This post by the author is a great introduction to the techniques used in ripgrep https://blog.burntsushi.net/ripgrep/
Re:Ripgrep 13.0
by boredprograming on Monday June 14, 2021 @03:32PM
(#27507142)
That's awesome!
Longer story: Ripgrep uses Rust's regex library, which uses the Aho-Corasick library. That does not just provide the algorithm it is named after, but also "packed" ones using SIMD, including a Rust rewrite of the [Teddy algorithm][1] from the Hyperscan project.
[1]: https://github.com/BurntSushi/aho-corasick/tree/4499d7fdb41c...