Search for Repeated Arguments
The function repeat() is used when searching for repeated arguments.
Syntax
Optional parameters min_repeats and max_repeats set minimum and maximum number of matched repetitions of the argument in the text.
If the parameter max_repeats is absent, the function matches all sequences, containing no less than min_repeats of the argument. If both parameters are absent, the function matches sequences, containing any number of repetitions of the argument.
The function also supports optional named parameters allow_punct and allow_space that regulate whether, correspondingly, punctuation marks and spaces are allowed within the sequence. The parameters take on the following values:
Parameter |
Explanation |
allow_punct:=yes |
Punctuation marks are allowed within the sequence. |
allow_punct:=no (default value) |
Punctuation marks are not allowed within the sequence. |
allow_space:=yes (default value) |
Spaces are allowed within the sequence. |
allow_space:=no |
Spaces are not allowed within the sequence. |
Examples