parent
3abea6ba61
commit
47585ee920
|
@ -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.
|
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:
|
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]+?')
|
str_view(x, 'C[LX]+?')
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Collectively, these operators are called **quantifiers** because they quantify how many times a match can occur.
|
||||||
|
|
||||||
#### Exercises
|
#### Exercises
|
||||||
|
|
||||||
1. Describe the equivalents of `?`, `+`, `*` in `{m,n}` form.
|
1. Describe the equivalents of `?`, `+`, `*` in `{m,n}` form.
|
||||||
|
|
Loading…
Reference in New Issue