News for hackers. Stuff that matters.
Re:Syntax extensions and regular expressions for Rust by burntsushi on Sunday April 27, 2014 @01:46PM (#7655998)
Yes. It's a reasonably faithful port of RE2, which elides features like backreferences.
Re:Syntax extensions and regular expressions for Rust by pjscott on Sunday April 27, 2014 @10:34PM (#7657955)
This is usually a small price to pay for guaranteed O(n) matching speed. (Kudos to the author for doing the Right Thing here.)
Re:Syntax extensions and regular expressions for Rust by burntsushi on Sunday April 27, 2014 @11:49PM (#7658141)
Thanks :-) The implementation is basically the Pike VM as described by Russ Cox. Recursion depth in particular has an upper bound corresponding to the number of instructions in the regex. In practice, this means it's safe to run a regex on untrusted data.

(Creating a regex from untrusted data still needs a bit of work, but is fixable!)