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
-
▲ 4
An implementation of regular expressions for Ruststory by tosh · 2017-09-04 · 0 comments
-
…and in Rust, it's a `extern "C" fn foo() ...` function declaration. You can see an example here: https://github.com/rust-lang/regex/tree/master/regex-capi Adding C++ ABI support is a significant effort.
comment by burntsushi · 2017-08-31 · in Announcing Rust 1.20 -
…times 3 = 249, which buts up against a hard-coded limit in the regex engine for literal detection: https://github.com/rust-lang/regex/blob/d894c631cb6c9a062c13... In this case, the literal detector knows that the literal is a prefix. That…
comment by burntsushi · 2017-07-04 · in Skip grep, use awk -
…a decent write-up for us in the Rust reimplementation of our "Teddy" literal matcher. Please see https://github.com/rust-lang/regex/blob/master/src/simd_acce... if interested or look up the Hyperscan project at…
comment by glangdale · 2017-05-26 · in Writing a Fast JSON Parser -
…facing performance issues with Go's regex engine. [1] https://github.com/BurntSushi/rure-go [2] https://github.com/rust-lang/regex
comment by stymaar · 2017-03-21 · in The 1960's elegance behind Go's regexp -
…structure and a regex! compiler plugin, the latter is currently significantly slower at runtime : https://github.com/rust-lang/regex#usage-regex-compiler-plug...
comment by masklinn · 2017-02-14 · in Hero – A handy, fast and powerful Go template engine -
…(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? -
▲ 4
Rure – A C API for the Rust regex librarystory by yberreby · 2016-04-30 · 1 comment
-
…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