Testing for Text String Values

The following conditionals are supported to test whether a text value is matches or does not match another text string:

Text Value Conditional Usage Example

==

(equal to)

<t:if test="property_name == 'Joe'">
Hey Joe!
</t:if>

!=

(not equal to)

<t:if test="property_name != 'Lucy'">
Hey person who is not Lucy.
</t:if>

To test for a partial string match, use the matches function to compare the property value to a regular expression:

Where Regular Expression Example Matching String
Starts with [string].* Dog.* Dogs Gone Wild
Ends with .*[string] .*Dog I Cannot Eat One More Hot Dog
Anywhere .*[string].* .*Dog.* A Dog Day Afternoon