Advanced regular expressions in R with str_replace and separate (CC184)
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