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. This is the source code repository for RE2, a regular expression library. There is a fair amount of documentation (including code snippets) in the re2.h header file. Unless otherwise noted, the RE2 source files are distributed under the BSD-style license found in the LICENSE file. In POSIX mode, RE2 accepts standard POSIX (egrep) syntax regular expressions. In Perl mode, RE2 accepts most Perl operators. The only excluded ones are those that require backtracking (and its potential for exponential runtime) to implement. These include backreferences (submatching is still okay) and generalized assertions. The Syntax page documents the supported Perl-mode syntax in detail. The default is Perl mode. The constructor takes an optional second argument that can be used to change RE2's default options.

Features

  • You can declare your own RE2::Options object and then configure it as you like
  • RE2 operates on Unicode code points
  • It makes no attempt at normalization
  • Construct your own argument lists
  • Use RE2 as a lexer, or parsing hex, octal, and C-radix numbers
  • RE2 accepts standard POSIX (egrep) syntax regular expressions

Project Activity

See All Activity >

Categories

Libraries

License

BSD License

Follow re2

re2 Web Site

Other Useful Business Software
Build Securely on Azure with Proven Frameworks Icon
Build Securely on Azure with Proven Frameworks

Lay a foundation for success with Tested Reference Architectures developed by Fortinet’s experts. Learn more in this white paper.

Moving to the cloud brings new challenges. How can you manage a larger attack surface while ensuring great network performance? Turn to Fortinet’s Tested Reference Architectures, blueprints for designing and securing cloud environments built by cybersecurity experts. Learn more and explore use cases in this white paper.
Download Now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of re2!

Additional Project Details

Programming Language

C++

Related Categories

C++ Libraries

Registered

2021-09-13