rust-lang/regex
View on GitHub ↗ ★ 4,048 Rust
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
78 mentions on Hacker News by 39 people: 7 stories, 71 comments · first 2015-01-15 · latest 2026-02-20
20082026
-
…(The cases where it matters is if your regex is large, e.g., `\pL{100}` is large indeed.) [1] - https://github.com/rust-lang/regex/blob/master/bench/log/05/... [2] - https://github.com/rust-lang/regex/blob/master/examples/shoo...
comment by burntsushi · 2017-02-09 · in Regex: badly needs fuzzing -
…a benchmark for line oriented search tools. Nevertheless, it is a collection of data points. [1] - https://github.com/rust-lang/regex/blob/master/bench/src/ffi... [2] - https://github.com/rust-lang/regex/tree/master/bench/log/05 [3] -…
comment by burntsushi · 2017-02-09 · in Regex: badly needs fuzzing -
…that the fuzzing was done, but doesn't link to the issues that were uncovered by fuzzing. The PR at https://github.com/rust-lang/regex/pull/262 does: one infinite loop, four panics, and one instance of the NFA reporting the wrong position…
comment by kibwen · 2017-02-08 · in Regex: badly needs fuzzing -
Rust's regex crate has fuzzing running against it, and that has lead to a lot of useful small fixes: https://github.com/rust-lang/regex/pull/262
comment by moosingin3space · 2017-02-08 · in Regex: badly needs fuzzing -
Also more recently: https://github.com/rust-lang/regex/pull/262
comment by mastax · 2017-02-08 · in Regex: badly needs fuzzing -
…(still not a memory safety issue, more akin to an unchecked exception in Java than a crash in C++): https://github.com/rust-lang/regex/issues/84 Since that issue is from the same time as Rust's 1.0 release, I suspect that either it hasn't…
comment by dikaiosune · 2017-02-08 · in Regex: badly needs fuzzing -
…e.g. see this issue [1]. [0] http://benchmarksgame.alioth.debian.org/u64q/performance.php... [1] https://github.com/rust-lang/regex/issues/203
comment by gpm · 2017-02-08 · in Regex: badly needs fuzzing -
…multiple patterns. I implemented one here (the comments include a description with examples): https://github.com/rust-lang-nursery/regex/blob/master/src/s... ) * The actual regex engine is a lazy DFA (similar to RE2) in that its states are…
comment by burntsushi · 2016-08-24 · in Why GNU grep is fast (2010) -
And Rust! https://github.com/rust-lang-nursery/regex
comment by burntsushi · 2016-07-20 · in Stack Overflow Outage Postmortem -
…the benchmarks game. From my experience, it would probably be near the top. It's quite fast! [1] - https://github.com/rust-lang-nursery/regex/blob/master/src/s... [2] - https://github.com/01org/hyperscan
comment by burntsushi · 2016-06-11 · in Why Rust for Low-Level Linux Programming? -
…I do record benchmarks from time to time in the repo to track progress, which you can see here: https://github.com/rust-lang-nursery/regex/tree/master/bench... --- You'll have to do the comparison yourself though. There is some…
comment by burntsushi · 2016-05-03 · in Go bindings to Rust's regex engine -
…the same (similar) scheme as in RE2, which is now the Go's implementation, am I misinformed? [0]: https://github.com/rust-lang-nursery/regex/commit/e5a5198eee...
comment by niersi · 2016-05-03 · in Go bindings to Rust's regex engine -
…Boyer-Moore are probably just as important. You might glean more information from my hacking guide: https://github.com/rust-lang-nursery/regex/blob/master/HACKI...
comment by burntsushi · 2016-05-02 · in Go bindings to Rust's regex engine -
This is beautiful: https://github.com/rust-lang-nursery/regex/blob/master/src/d...
comment by killercup · 2016-05-01 · in Ask HN: What are examples of GitHub repositories with high code quality? -
…linear, not quadratic. Let's just look at code already. Here's the loop over states at input i: https://github.com/rust-lang-nursery/regex/blob/master/src/n... If we match a character at input i, then we follow epsilon transitions:…
comment by burntsushi · 2016-02-24 · in LL and LR in Context: Why Parsing Tools Are Hard (2013) -
…should be besting PCRE now, even when PCRE's JIT is enabled. There are some benchmarks on the PR: https://github.com/rust-lang-nursery/regex/pull/164#issuecom... Also, FYI, but the rejit in the GP's benchmark link is not the same rejit in…
comment by burntsushi · 2016-02-15 · in Rejit: a work-in-progress JIT-powered regex engine -
It's worth noting that this is an old post. This crate is still used today, over at https://github.com/rust-lang-nursery/regex
comment by steveklabnik · 2016-01-21 · in Syntax extensions and regular expressions for Rust (2014) -
https://github.com/rust-lang/regex/pull/91 I'm guessing, probably more specifically https://github.com/rust-lang/regex/issues/21 The bench changes are very impressive (beware though, new benches have been added as smaller ones had gotten…
comment by masklinn · 2015-06-25 · in Rust's regex-dna benchmark results -
This uses a pure-Rust regex engine[1] by Andrew Gallant. [1]: https://github.com/rust-lang/regex
comment by brson · 2015-06-25 · in Rust's regex-dna benchmark results -
…preferred :-) The reason it still uses the alternate pcre is because this still hasn't been fixed: https://github.com/rust-lang/regex/issues/28 I would love to get rid of that nastiness.
comment by kanaka · 2015-03-04 · in Make a Lisp in Nim -
…pretty expensive (although it is at least doing a binary search on contiguous ranges of characters: https://github.com/rust-lang/regex/blob/master/src/vm.rs#L23... ). When I switched `\w+` to `[a-zA-Z0-9_]+` in the Rust program, I saw a…
comment by burntsushi · 2015-01-15 · in A Quick Comparison of Nim vs. Rust