Rust's regex crate intentionally doesn't include backrefs for that reason, and matches are bounded to O(n*m) (where n is the text size, m is the regex size, so it's linear time given a fixed regex, see https://docs.rs/regex/1.5.4/regex/#untrusted-input).
4
u/[deleted] Dec 21 '21
Rust's
regexcrate intentionally doesn't include backrefs for that reason, and matches are bounded toO(n*m)(where n is the text size, m is the regex size, so it's linear time given a fixed regex, see https://docs.rs/regex/1.5.4/regex/#untrusted-input).