Preceding Element {m,n}
Summary
{m,n} matches the preceding element at least m and not more than n times. The element can be:
Syntax |
Semantics |
Recommended Use |
---|---|---|
character(s){m,n}
|
Where one or more characters is followed by {m,n} |
Use it to match the preceding character at least m and not more than n times. |
[character- range]{m,n} |
Where a character range is followed by {m,n} |
Use it to match the preceding character range at least m and not more than n times. |
Examples
Example of query |
Results |
---|---|
a{3,5} |
only 'aaa', 'aaaa', 'aaaaa' |
ba{2,3}b |
'baab', 'baaab', but not 'bab', 'baaaaab' |
ba{0,3}b |
'bb', 'bab', 'baab', 'baaab', but not 'baaaab', 'baaaaaab' |
[0-9]{2,7} |
23, 601, 060615 and all other combinations from 2 to 7 numbers. |
2{1,3} |
2, 22, 22-4-1999 |