From 47585ee92019adb89bf6b86e38714c8217e92088 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Sun, 18 Apr 2021 08:57:24 -0500 Subject: [PATCH] Mention quantifier term Fixes #898 --- strings.Rmd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/strings.Rmd b/strings.Rmd index 75ba4c5..4f42585 100644 --- a/strings.Rmd +++ b/strings.Rmd @@ -373,7 +373,7 @@ str_view(c("grey", "gray"), "gr(e|a)y") 5. Create a regular expression that will match telephone numbers as commonly written in your country. -### Repetition +### Repetition / Quantifiers The next step up in power involves controlling how many times a pattern matches: @@ -414,6 +414,8 @@ str_view(x, 'C{2,3}?') str_view(x, 'C[LX]+?') ``` +Collectively, these operators are called **quantifiers** because they quantify how many times a match can occur. + #### Exercises 1. Describe the equivalents of `?`, `+`, `*` in `{m,n}` form.