diff --git a/strings.Rmd b/strings.Rmd index e3bd375..3e4dc1c 100644 --- a/strings.Rmd +++ b/strings.Rmd @@ -248,7 +248,7 @@ In this book, I'll write a regular expression like `\.` and the string that repr By default, regular expressions will match any part of a string. It's often useful to _anchor_ the regular expression so that it matches from the start or end of the string. You can use: * `^` to match the start of the string. -* `*` to match the end of the string. +* `$` to match the end of the string. ```{r} x <- c("apple", "banana", "pear")