Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 3 typos in regexps #1428

Merged
merged 3 commits into from
Apr 17, 2023
Merged
Changes from 1 commit
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
Next Next commit
If you want to match at the start **or** end you need to anchor the r…
…egular expression …
  • Loading branch information
petzi53 committed Apr 17, 2023
commit 40f7d4002dc5155ce1ed09bcad3b7eb0b80551fd
2 changes: 1 addition & 1 deletion regexps.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 347,7 @@ str_view(c("abc", "a.c", "a*c", "a c"), ".[*]c")
### Anchors

By default, regular expressions will match any part of a string.
If you want to match at the start of end you need to **anchor** the regular expression using `^` to match the start or `$` to match the end:
If you want to match at the start or end you need to **anchor** the regular expression using `^` to match the start or `$` to match the end:

```{r}
str_view(fruit, "^a")
Expand Down