Google releases the RE2 library

by Ville Laurikari on March 12, 2010

Yesterday, Russ Cox released a new regex matching library from Google, as an open source project. I think it’s very interesting and worth a look.

It shares many of the technical characteristics with TRE, mainly:

  • Guarantee searching time linear to the size of input (no backreferences).
  • Guarantee small fixed stack usage when searching

RE2 is compatible with the PCRE API, whereas TRE uses the POSIX API. RE2 does not have approximate matching support, so that continues to be the main differentiator of TRE compared to any other library out there.

{ 3 comments… read them below or add one }

1 regulator May 6, 2010 at 16:57

Quick, someone start a project called YARE (Yet Another RE)….

2 ryan September 21, 2010 at 16:17

why tre is slower than re2 ?? as the page : http://sljit.sourceforge.net/regex_perf.html

3 Anon November 1, 2015 at 11:43

@regulator:
How about the name JavaScriptCore chose to give their regex engine – https://trac.webkit.org/wiki/SourceDirectory ?

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Previous post:

Next post: