regexr

regexr is an R framework for constructing and managing human readable regular expressions. It aims to provide tools that enable the user to write regular expressions in a way that is similar to the ways R code is written. The tools allow the user to:

  1. Write in smaller, modular, named, sub-expressions
  2. Write top to bottom, rather than a single string
  3. Comment individual chunks
  4. Indent expressions to represent regular expression groups
  5. Add vertical line spaces and R comments (i.e., #)
  6. Test the validity of the concatenated expression and the modular sub-expressions

reg

 

 

 

 

 

This framework harnesses the power and flexibility of regular expressions but provides a structural frame that is more consistent with both code writing and natural language conventions. The user decides how to break, indent, name, and comment the sub-expressions in a way that is human readable, meaningful, and modular.

Installation

To download the development version of regexr:

Download the zip ball or tar ball, decompress and run R CMD INSTALL on it, or use the devtools package to install the development version:

# install.packages("devtools")
devtools::install_github("trinker/regexr")

Note: Windows users need Rtools and devtools to install this way.


Help

regexr Web Page
Package PDF Help Manual

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s