Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manuscript/regex.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Notice that the `sub()` function found the first match (at the beginning of the
gsub("<dd>[F|f]ound on |</dd>", "", x)
```

The `sub() and `gsub()` functions can take vector arguments so we don't have to process each string one by one.
The `sub()` and `gsub()` functions can take vector arguments so we don't have to process each string one by one.

```{r}
r <- regexpr("<dd>[F|f]ound(.*?)</dd>", homicides[1:5])
Expand Down
2 changes: 1 addition & 1 deletion manuscript/regex.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Notice that the `sub()` function found the first match (at the beginning of the
[1] "January 1, 2007"
~~~~~~~~

The `sub() and `gsub()` functions can take vector arguments so we don't have to process each string one by one.
The `sub()` and `gsub()` functions can take vector arguments so we don't have to process each string one by one.


{line-numbers=off}
Expand Down