E.4 Resources

Regular expressions are powerful tools, of course, but also a slippery slope on which computer-friendly folks can easily spend more time than anyone must know. Consider the clip in Figure E.4 a friendly warning:

Yet another use of regular expressions: Creating new problems to be solved by regular expressions… (from xkcd).

Figure E.4: Yet another use of regular expressions: Creating new problems to be solved by regular expressions… (from xkcd).

Consult the following links for additional resources on regular expressions.

E.4.1 Background

For a proper definition, the historical background, and some key references on regular expressions:

E.4.2 Learning and training

Many online sites offer tutorials and ways of trying out your regex skills:

E.4.3 References

For using regular expressions in R:

  • Evaluating ?base::regex provides documentation on Regular Expressions as used in R.

  • See the back page of the Posit cheatsheets on the stringr package (Wickham, 2022) and the cheatsheet on Basic Regular Expressions in R (contributed by Ian Kopacka):

Basic regular expressions in R (by Ian Kopacka)<br> available at [Posit cheatsheets](https://posit.co/resources/cheatsheets/).

Figure E.5: Basic regular expressions in R (by Ian Kopacka)
available at Posit cheatsheets.


ds4psy

[70_regex.Rmd updated on 2024-09-06 12:17:37.48384 by hn.]

References

Wickham, H. (2022). stringr: Simple, consistent wrappers for common string operations. Retrieved from https://stringr.tidyverse.org