Skip to content
rusthacks.dev

Tag

regex

2 posts

Flat illustration for the post “Regex Performance in Rust and Avoiding Catastrophic Cases”, composed around cargo.
CLI

Regex Performance in Rust and Avoiding Catastrophic Cases

Rust's regex crate guarantees linear-time matching, so there is no catastrophic backtracking. The real costs are compiling in a loop, unanchored scans and capture groups. Learn what to cache and when to use regex-lite.

4 min read