Water 5-Common Data Types-String Regex
class pattern.one_of
Match one of a given set of characters or strings
Contract
Parameter keyDefault valueType
a_typeopt
regex_stringoptstring
Parameter kindDefault valueType
Other unkeyed argumentsopttype.<one_of char string/>
Water Contract
<class pattern.one_of
  regex_string  =opt=string
  _other_unkeyed=opt=<type.one_of char string/>=ekind.code="_add_to_environment"
/>

See also: is_type_for, get_string_segments, replace_string_segments, string_segment, char

Pattern that matches a character from a set of characters or strings.
pattern.<one_of "A" "Book" "C" />.regex_string
"(A|Book|C)"
Example: Matches one of the strings
pattern.<one_of "A" "Book" "C" />.
<is_type_for "xxx123Book!@#" />
true
Example: Matches several instances of the strings
<pattern pattern.start_of_line
         pattern.<one_or_more pattern.<one_of "A" "Book" "C" /> />
         pattern.end_of_line />.
<is_type_for "ABookABookAC" />
true
Example: Does not match the pattern
<pattern pattern.start_of_line
         pattern.<one_or_more pattern.<one_of "A" "Book" "C" /> />
         pattern.end_of_line />.
<is_type_for "ABookAZBookAC" />
false