Really like the minimalistic design, not too designy but still easy on my eyes. Just the way I want it to let me focus on the task at hand
Show HN: Search code in GitHub repos using regular expressions
161–165 of 165 posts
Re: Show HN: Search code in GitHub repos using regular expressions
#162Earlier quoted context omitted.
Ripgrep is based on RE2 and supports backrefs. Wonder why they didn't use that.
Not quite. ripgrep uses Rust's regex engine, not RE2. Rust's regex engine is descended from RE2, but there is no code sharing. Rust's regex engine does not support backreferences. RE2 does not either. ripgrep does however have a -P/--pcre2 flag which causes it to use PCRE2 instead of Rust's regex engine. PCRE2 supports backreferences and other things, like look-around. (ripgrep also has an --auto-hybrid-regex flag, w…
https://www.arl.wustl.edu/~pcrowley/a25-becchi.pdf
(1) Extending Finite Automata to Efficiently Match Perl-Compatible Regular Expressions.
Re: Show HN: Search code in GitHub repos using regular expressions
#163Re: Show HN: Search code in GitHub repos using regular expressions
#164Earlier quoted context omitted.
Not quite. ripgrep uses Rust's regex engine, not RE2. Rust's regex engine is descended from RE2, but there is no code sharing. Rust's regex engine does not support backreferences. RE2 does not either. ripgrep does however have a -P/--pcre2 flag which causes it to use PCRE2 instead of Rust's regex engine. PCRE2 supports backreferences and other things, like look-around. (ripgrep also has an --auto-hybrid-regex flag, w…
Perhaps to protect against ReDoS the client should use an extended finite automata (1). https://www.arl.wustl.edu/~pcrowley/a25-becchi.pdf (1) Extending Finite Automata to Efficiently Match Perl-Compatible Regular Expressions.
Besides, that paper was published 12 years ago. Where is the productionized version of it? Or are you suggesting the the OP go spend a few years writing a regex eninge? :-) Doesn't seem like a particularly practical suggestion.
[1] - https://perl.plover.com/NPC/NPC-3SAT.html
[2] - https://branchfree.org/2019/04/04/question-is-matching-fixed...
Re: Show HN: Search code in GitHub repos using regular expressions
#165Earlier quoted context omitted.
Perhaps to protect against ReDoS the client should use an extended finite automata (1). https://www.arl.wustl.edu/~pcrowley/a25-becchi.pdf (1) Extending Finite Automata to Efficiently Match Perl-Compatible Regular Expressions.
Nope. That still supports backreferences, and resolving backreferences is an NP-complete problem.[1] And I don't see anything in that paper that addresses that. Note that there may be some versions of the problem that maybe aren't NP-complete[2], but again, not addressed by that paper. Besides, that paper was published 12 years ago. Where is the productionized version of it? Or are you suggesting the the OP go spend…
By the way, good work ripgrep and rust.