Quantifiers

Quantifiers control how many times a pattern matches.

  • ? 0 or 1 matches.
  • + 1 or more matches.
  • * 0 or more matches.

Specify the number of matches with {}:

  • {n} matches exactly n times.
  • {n,} matches at least n times.
  • {n,m} matches between n and m times.