{n,m} Bounded repeats |
Top Previous Next |
Whereas the '+' or '*' characters will repeat the previous section as much, or as little, as required it is possible to specify a specific number of required repeats using the '{' and '}' characters.
a{n} matches 'a' repeated exactly n times a{n,} matches 'a' repeated n or more times a{n,m} matches 'a' repeated between n and m times inclusive.
For example,
[0-9]{4,6} matches any number between 1000 and 999999 |