Hacker News new | past | comments | ask | show | jobs | submit login

Yes the state machine data structure are also used in regex engines. The author of the fst crate also created Rust's regex crate and the ripgrep [0] CLI tool.

The regex crate has multiple implementations of regex matching algorithms, which is exposed as a library [1]. The implementations are selected at runtime based on which is faster and works right for a given regex. See also [2]

[0] https://blog.burntsushi.net/ripgrep/

[1] https://blog.burntsushi.net/regex-internals/

[2] https://docs.rs/regex-automata/latest/regex_automata/#availa...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: