3 ms·
Rust's regex library also doesn't have this issue [1], and is easily usable by other languages [2]. If you're concerned about this issue in your code and your n
by gpm 8y ago
Rust's regex library also doesn't have this issue [1], and is easily usable by other languages [2]. If you're concerned about this issue in your code and your not using go it's probably easier to use this than the go one.
[1] https://docs.rs/regex/1.1.0/regex/ https://docs.rs/regex/1.1.0/regex/
[2]
- C (and thus everything with a FFI): https://github.com/rust-lang/regex/tree/master/regex-capi https://github.com/rust-lang/regex/tree/master/regex-capi
- Go (heh): https://github.com/BurntSushi/rure-go https://github.com/BurntSushi/rure-go
- Possibly somewhat out of date Python: https://github.com/davidblewett/rure-python https://github.com/davidblewett/rure-python
- cyphar 8y agoSure, but the only reason I mentioned Go is because Russ Cox literally wrote the paper on this problem and also happened to write the Go regex library (as well as a large part of Go itself). I wrote an FSA-based regex implementation in Python some years ago[1] as a learning experience, but that's not really relevant to someone asking "what is a pathological regex". [1]: https://github.com/cyphar/redone https://github.com/cyphar/redone