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
Get Avast Free Antivirus with 24/7 AI-powered online scam detection Icon
Get Avast Free Antivirus with 24/7 AI-powered online scam detection

Get protection for today’s online threats. Free.

Award-winning antivirus protection, as well as protection against online scams, dangerous Wi-Fi connections, hacked accounts, and ransomware. It includes Avast Assistant, your built-in AI partner, which gives you help with suspicious online messages, offers, and more.
Free Download
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