Easily Use Regular Expressions with The R Language

Regex Support in The R Project

The R project for statistical computing includes a comprehensive set of regular expression functions as part of the base package supplied with the R language. These functions support three different regular expression flavors called “basic”, “extended” and “perl” in the R documentation. RegexBuddy supports these flavors as GNU BRE, GNU ERE and PCRE. The “perl” flavor was switched to PCRE2 in R 4.0.0. In RegexBuddy, you just select the version of R you’re working with. RegexBuddy automatically selects the correct version of PCRE or PCRE2 that your version of R is built with. RegexBuddy knows exactly which regex features are available in R 2.14.0 through R 4.2.1.

In addition, RegexBuddy supports R’s stringi package. This package allows R to use the regex engine provided by the International Components for Unicode (ICU). The stringi package comes bundled with ICU but can also use the ICU library provided by the operating system. RegexBuddy supports stringi 1.2 through 1.8 which in turn support ICU 55 through ICU 77. RegexBuddy knows all the differences between these versions of ICU, down to the exact characters matched by each Unicode property in each Unicode version supported by each ICU release.

See How Easy Managing Data 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’re writing a code library that needs to work with multiple versions of R, compare your regular expressions between those R versions to make sure it will work as intended with all of them. If you’re migrating code between R’s built-in regex support and the stringi package then convert your regular expressions between the PCRE, PCRE2, and ICU regex flavors.

If you created a new regular expression, test and debug it in RegexBuddy before using it in your R code. 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 statistical package.

Finally, let RegexBuddy generate a source code snippet that you can copy and paste directly into the R IDE or your favorite R code editor. Just choose what you want to use the regex for, and a fully functional code snippet is ready. The snippet can use the built-in R regexpr and grep functions, or it can use the regex functions of the stringi pacakge. 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 the R function calls and the parameters they require. And don’t worry about properly escaping backslashes and quotes. Just tell RegexBuddy what you want to do, and you will get the proper R code straight away.

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


Let RegexBuddy Make Regex Easy for You