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:
- Write in smaller, modular, named, sub-expressions
- Write top to bottom, rather than a single string
- Comment individual chunks
- Indent expressions to represent regular expression groups
- Add vertical line spaces and R comments (i.e.,
- Test the validity of the concatenated expression and the modular sub-expressions
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.
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.