Water 5-Common Data Types-String Regex
method pattern.is_type_for
Test whether a pattern matches a target string
Contract
Return typewob
Parameter keyDefault valueType
a_thingreqthing
Water Contract
<method pattern.is_type_for
  a_thing=req=thing/>

See also: get_string_segments, replace_string_segments, string_segment

Use the is_type_for method to determine whether a target string has a match for the _subject of type pattern . If a match is found in the target string, this method returns true , otherwise it returns false .

a wob
Parameter keyDefault valueType
a_thingreqthing
The required target string to which to apply the pattern.

Example: Match a simple pattern
pattern.uppercase.<is_type_for "A" />
true
Example: A more complex pattern
<pattern "ABC" pattern.<one_of "D" "E" "F" /> "GHI" />.
  <is_type_for "ABCEGHI" />
true

For more information about constructing patterns to use with is_type_for , see the general documentation for the pattern class.