Fix typos - strings.Rmd (#149)
* Fix typos * Changed excercise 10.2.6 1.2 back to original
This commit is contained in:
parent
154cd9486b
commit
0934f77c28
|
@ -364,7 +364,7 @@ Note that the precedence of these operators is high, so you can write: `colou?r`
|
||||||
|
|
||||||
### Grouping and backreferences
|
### Grouping and backreferences
|
||||||
|
|
||||||
You learned about parentheses earlier as a way to disambiguate complex expression. They do one other special thing: they also define numeric groups that you can refer to with _backreferences_, `\1`, `\2` etc.For example, the following regular expression finds all fruits that have a pair of letters that's repeated.
|
You learned about parentheses earlier as a way to disambiguate complex expression. They do one other special thing: they also define numeric groups that you can refer to with _backreferences_, `\1`, `\2` etc. For example, the following regular expression finds all fruits that have a pair of letters that's repeated.
|
||||||
|
|
||||||
```{r, cache = FALSE}
|
```{r, cache = FALSE}
|
||||||
str_view(fruit, "(..)\\1", match = TRUE)
|
str_view(fruit, "(..)\\1", match = TRUE)
|
||||||
|
@ -602,7 +602,7 @@ sentences %>%
|
||||||
|
|
||||||
#### Exercises
|
#### Exercises
|
||||||
|
|
||||||
1. Replace all `/`'s in a string with `\`'s.
|
1. Replace all `/`s in a string with `\`s.
|
||||||
|
|
||||||
### Splitting
|
### Splitting
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue