Skip to content
Regex

Quantifiers

Control how many times a token repeats.

#quantifier#greedy#lazy

Code

regex
a*        zero or more
a+        one or more
a?        zero or one
a{3}      exactly 3
a{3,}     3 or more
a{3,5}    between 3 and 5
a*?       lazy (fewest) version of *
a+?       lazy one or more
colou?r   matches color or colour