Water 5-Common Data Types-String RegexTest whether a pattern matches a target string
Contract| Return type | wob | | Parameter key | Default value | Type | | a_thing | req | thing | | 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 key | Default value | Type |
| a_thing | req | thing |
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.
© Copyright 2007 Clear Methods, Inc.