Water 5-Common Data Types-String RegexMatch a pattern a number of times
Contract| Parameter key | Default value | Type | | a_pattern | req | | a_type | opt | | regex_string | opt | string | | min | 0 | integer | | max | "infinity" | type.<one_of "infinity" number.integer/> | | greedy | true | boolean | | Water Contract<class pattern.quantity
a_pattern =req
min =0=number.integer
max ="infinity"=<type.one_of "infinity" number.integer/>
greedy =true=boolean
/> | |
See also: is_type_for, get_string_segments, replace_string_segments, string_segment, zero_or_one, zero_or_more, one_or_more
This class is used to specify a min and max number
of times the given pattern should be repeated contiguously in the
target string.
a wob
| Parameter key | Default value | Type |
| a_pattern | req |
Any valid pattern. If the default values for min,
max, and greedy are used, the pattern will
be matched as often as it is detected.
pattern.<quantity pattern.uppercase />.
<is_type_for "xxxABCDzzz" />
 | true |
a wob
| Parameter key | Default value | Type |
| min | 0 | integer |
Specifies the minimum number of times the pattern should be repeated
contiguously.
Example: Pattern repeated contiguously 2 to 4 times
pattern.<quantity "abc" min=2 max=4 />.
<is_type_for "abcabcabc" />
 | true |
Example: Pattern repeated contiguously less than min times
pattern.<quantity "abc" min=2 max=4 />.
<is_type_for "abcxxx" />
 | false |
a wob
| Parameter key | Default value | Type |
| max | "infinity" | type.<one_of "infinity" number.integer/> |
Sets the maximum number of times a pattern may match in the
target string.
Example: Has more than the maximum quantity from start to end
<pattern pattern.start_of_line
pattern.<quantity pattern.<one_of "A" "B" "C" /> min=1 max=2 />
pattern.end_of_line />.
<is_type_for "ACAB" /> | false |
a wobmax="infinity"
If max is the string "infinity", then the number of times matched is
min or more. This is the default value for this field.
Example: Pattern repeats at least five times
<pattern pattern.start_of_line
pattern.<quantity pattern.alphanumeric min=5 max="infinity" /> />.
<is_type_for "ab123!@#" /> | true |
a wob
| Parameter key | Default value | Type |
| greedy | true | boolean |
When greedy is false, only min-max values of:
0 1, 0 "infinity", 1 "infinity" are supported
© Copyright 2007 Clear Methods, Inc.