Advanced regular expressions in R with str_replace and separate (CC184)

February 3, 2022 • PD Schloss • 1 min read

R has a very powerful set of features for building and using regular expressions. In this episode we move beyond the basics and discuss anchors, universal and specific metacharacters, and how to specify groups within a pattern that you can use in the replacement value. Finally, we’ll use all this with the separate function. We’ll do all this in RStudio using the stringr package.

Code

You can browse the state of the repository at the

comments powered by Disqus