Quantifiers
Quantifiers control how many times a pattern can match:
?
makes a pattern optional (i.e. it matches 0 or 1 times)+
lets a pattern repeat (i.e. it matches at least once)*
lets a pattern be optional or repeat (i.e. it matches any number of times, including 0).
## [1] │ <a>
## [2] │ <ab>
## [3] │ <ab>b
## [2] │ <ab>
## [3] │ <abb>
## [1] │ <a>
## [2] │ <ab>
## [3] │ <abb>