Update regexps.qmd (#1065)
Fixed a few errors. Could you also explain why there are two dots in "..\\1" rather than three dots or some other numbers of dots?
This commit is contained in:
@@ -456,7 +456,7 @@ All of these are these described below.
|
|||||||
### Matching a repeated pattern
|
### Matching a repeated pattern
|
||||||
|
|
||||||
You can refer back to previously matched text inside parentheses by using **back reference**.
|
You can refer back to previously matched text inside parentheses by using **back reference**.
|
||||||
Back references are usually numbered: `\1` refers to the match contained in the first parentheses, `\2` in the the second parentheses, and so on.
|
Back references are usually numbered: `\1` refers to the match contained in the first parenthesis, `\2` in the second parenthesis, and so on.
|
||||||
For example, the following pattern finds all fruits that have a repeated pair of letters:
|
For example, the following pattern finds all fruits that have a repeated pair of letters:
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
|
|||||||
Reference in New Issue
Block a user