Skip to content
RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.
C++ Python Makefile Starlark Perl Shell Other
Branch: master
Clone or download

Latest commit

junyer Go back to using __builtin_ctzll(). Sigh.
Change-Id: Ie3cee16142347c97a68877312032e0fd77d4b2ef
Reviewed-by: Paul Wankadia <>
Latest commit b4073a9 Apr 7, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
benchlog benchlog: Add gnuplot support Jul 17, 2015
doc Update Unicode data to 13.0.0. Mar 15, 2020
kokoro No, it was right before. Try the /cygdrive form. Aug 18, 2019
lib/git Cleanup: Remove hg codereview extension. Apr 9, 2015
re2 Go back to using __builtin_ctzll(). Sigh. Apr 7, 2020
util SRWLOCK requires Windows Vista or Windows Server 2008 at minimum. Mar 13, 2020
.gitignore re2: exclude benchlog results in .gitignore Jul 10, 2015
.travis.yml Add Clang 10 to the Travis CI matrix. Apr 5, 2020
AUTHORS re2: make tables const Jan 10, 2014
BUILD Move util/flags.h into the testing target. Oct 11, 2019
CMakeLists.txt Partial revert of commit 7a10064. Aug 27, 2019 re2: more Gerrit+GitHub integration Nov 20, 2014
CONTRIBUTORS Remove comparisons of this with NULL. Jun 26, 2014
LICENSE initial release Mar 3, 2010
Makefile Set SONAME to 6. Mar 3, 2020
README Update the Erlang wrapper URL. Feb 13, 2019
WORKSPACE Switch to Starlark for C++ rules. Aug 18, 2019
libre2.symbols Include operator<<() for StringPiece in Jun 24, 2018
libre2.symbols.darwin Include operator<<() for StringPiece in Jun 24, 2018
re2.pc Simplify the plumbing for re2.pc. Aug 26, 2019
runtests Kludge around System Integrity Protection on Darwin. Mar 4, 2018 Get rid of using-directives. Aug 7, 2016
ucs2.diff add ucs2.diff, showing old UCS-2 support Feb 7, 2012


This is the source code repository for RE2, a regular expression library.

For documentation about how to install and use RE2,

The short version is:

make test
make install
make testinstall

There is a fair amount of documentation (including code snippets) in
the re2.h header file.

More information can be found on the wiki:

Issue tracker:

Mailing list:

Unless otherwise noted, the RE2 source files are distributed
under the BSD-style license found in the LICENSE file.

RE2's native language is C++.

A C wrapper is at
An Erlang wrapper is at and on Hex (
An Inferno wrapper is at
A Node.js wrapper is at and on NPM (
An OCaml wrapper is at and on OPAM (
A Perl wrapper is at and on CPAN (
A Python wrapper is at and on PyPI (
An R wrapper is at and on CRAN (
A Ruby wrapper is at and on RubyGems (
You can’t perform that action at this time.