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. (by google)


Basic RE2 repo stats
6 days ago

google/re2 is an open source project licensed under GNU General Public License v3.0 or later which is an OSI approved license.

RE2 Alternatives

Similar projects and alternatives to RE2

  • GitHub repo RegExr

    RegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions.

  • GitHub repo reco

    Regular Expression COmpiler - Compile a regex ahead of time to code (by Pita)

  • GitHub repo xstate

    State machines and statecharts for the modern web.

  • GitHub repo coffeescript

    Unfancy JavaScript

  • GitHub repo JavaVerbalExpressions

    Java regular expressions made easy.

  • GitHub repo referencesource

    Source from the Microsoft .NET Reference Source that represent a subset of the .NET Framework

  • GitHub repo awesome-workflow-engines

    A curated list of awesome open source workflow engines

  • GitHub repo compile-time-regular-expressions

    A Compile time PCRE (almost) compatible regular expression matcher.

  • GitHub repo regexp-examples

    Generate strings that match a given regular expression

NOTE: The number of mentions on this list indicates mentions on common posts. Hence, a higher number means a better RE2 alternative or higher similarity.


Posts where RE2 has been mentioned. We have used some of these posts to build our list of alternatives and similar projects - the last one was on 2021-05-07.
  • irregex
    Regular expressions can (and any good library will) be compiled to a DFA that executes in linear time. As soon as you add forward or back references that becomes impossible and the exponential algorithm has to be used. This is why high performance regex engines like re2 don't support these features.
  • '^(\w|\.|\_|\-)+[@](\w|\_|\-|\.)+[.]\w{2,3}$'
    well, you can name capturing groups, which is like 90% of detailing code.
  • Regex to get substring after pattern in Google Sheet
    But after reading this re2 syntax wiki, I think it's not supported to use after/before matching, is there any better option without using script ?
  • Regular Expression COmpiler - Compile a regex ahead of time to code | 2021-02-03
    At a personal level, I took on this challenge at some point, with the take of compiling RE2 to JavaScript, it's on the list of side-projects that require more time/love.
  • State machines are wonderful tools | 2021-01-01
    Most popular regex engines use backtracking and support non-regular features. They aren't based on automata, so implementing AND is perhaps not as theoretically straight-forward in that context.

    There are some popular finite automata based engines though. RE2 comes to mind. In theory, things like AND and complement could be implemented, but in practice, they blow up the size of the state machine.[1, 2] The current maintainer of RE2 did build a tool that permits intersection and complement though.[3]

    [1] -

    [2] -

    [3] -