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

You Might Also Like
Enterprise-Grade Monitoring - Zero Compromises Icon
Enterprise-Grade Monitoring - Zero Compromises

PRTG delivers deep visibility and proactive alerts for complex IT. Monitor, analyze, and optimize - all in one platform.

Managing a large, distributed IT environment demands more than basic monitoring. PRTG provides a unified view of your entire infrastructure - across sites, clouds, and hybrid setups. Advanced analytics, customizable dashboards, and granular access controls empower your team to detect issues early and respond fast. Automate reporting, ensure compliance, and scale effortlessly as your network grows. With PRTG, you get reliability, flexibility, and the insights you need to keep your business running at peak performance.
Start Your Free PRTG Trial
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