Google’s RE2 Regular Expression Engine

RE2 is Google’s regular expression engine. It is notable for using a non-backtracking engine which makes it immune to catastrophic backtracking and thus well-suited for applications that process user-provided regular expressions on the server, such as Google Sheets and Google BigQuery. If a user doesn’t test their regular expressions with RegexBuddy, which clearly indicates catastrophic backtracking when it occurs, a poorly written (or maliciously crafted) regex can cause many other regex engines that use a backtracking algorithm to perform poorly, take forever, or simply crash.

The price you pay for using a non-backtracking engine is that RE2 does not support commonly used features such as backreferences and lookaround that the other engines do support. RegexBuddy knows the exact syntax and feature set supported by RE2. It clearly points out any unsupported features. RegexBuddy also supports the RE2::POSIX option that further restricts the syntax.

      
Only US$ 59.95
Windows 7, 8, 8.1, 10, and 11
100% satisfied or money back

See How Easy Coding with Regexes Can Be

First, use RegexBuddy to define a regex or retrieve a regexp saved in a RegexBuddy library. Rely on RegexBuddy’s clear regex analysis, which is constantly updated as you build the pattern, rather than dealing with the cryptic regex syntax on your own. Detailed help on that syntax is always only a click away.

If you copied a regex written for another programming language, simply paste it into RegexBuddy, select the original language, and then convert the regex to the specific version of RE2 you’re working with. If you’re writing a code library that needs to work with multiple versions of RE2, compare your regex between those RE2 versions to make sure it will work as intended with all of them.

If you created a new regular expression, test and debug it in RegexBuddy before using it in your actual application. Test each regex in RegexBuddy’s safe sandbox without risking precious data. Quickly apply the regex to a wide variety of input and sample data, without having to produce that input through your application.

Finally, let RegexBuddy generate a source code snippet that you can copy and paste directly into the C++ code editor you use. Just choose what you want to use the regex for, and a fully functional code snippet is ready. You can change the names of variables and parameters to suit your naming style or the current situation, which RegexBuddy automatically remembers.

Don’t bother trying to remember which C++ classes to use or member functions to call. And don’t worry about properly escaping backslashes and quotes. Just tell RegexBuddy what you want to do, and you will get the proper C++ code straight away. Anything can be done: testing a string for a match, extracting search matches, validating input, search-and-replace, splitting a string, etc.

If you use an application such as Google Sheets or Google BigQuery that is based on RE2 then you can select specifically that application in RegexBuddy. Then RegexBuddy generates code snippets such as spreadsheet formulas or database queries that are tailored for that application, instead of C++ code that calls the RE2 libary directly.


Let RegexBuddy Make Regex Easy for You