length
Arguments
The first two arguments min_length and max_length are used to set minimum and maximum length (in characters), respectively. The argument min_length is required, while the max_length is optional. If max_length is not specified, the function matches arguments that consist of at least min_length characters.
In order to specify a unit of length, users may use the optional named parameter count:= that takes the following values:
Value |
Explanation |
character |
length is calculated in symbols (default value) |
token |
length is calculated in tokens (both words and punctuation) |
word |
length is calculated in words |
punctuation |
sets the number of punctuation signs |