To repeat, append a number in brackets to the pattern: for example, (string){n} means the string must be repeated n times for matching purposes.
Note
You must enclose the string in parentheses, and the repeating value must be enclosed in brackets.
Note
The number in braces must be greater than 0 (n>0).
Pattern | Description |
|---|---|
(1){5}=11111 | A string of five consecutive 1s without spaces must match. |
(text){3}=texttexttext | A string consisting of the word text repeated three times without spaces must match. |
To set a minimum and maximum, represent the equation as (string){3,5}
Pattern | Description |
|---|---|
(1){3,5}=111 or 1111 or 11111 | A string of three, four, OR five consecutive 1s without spaces must be match. |