- DarkLight
String Operators
- DarkLight
A string operator handles text comparisons, checking if strings are the same, different, or contain specific patterns. It’s useful for validating and working with text data.
The following table describes the string operators and provides examples for each.
Operator | Description | Example |
---|---|---|
is equal to | Checks if the string field matches exactly with another string. | City = "Texas" |
is not equal to | Checks if the string does not match another string. | State != "New York" |
is empty | Checks if the string has no characters. Essentially, it means the field or variable is completely blank, without any text, spaces, or hidden characters. | Address is empty |
is not empty | Checks if the string has one or more characters, meaning the field or variable has some value, even if it's just a space. | Address is not empty |
begins with | Checks if the string starts with certain characters.
| First Name begins with "John" |
ends with | Checks if the string ends with certain characters.
| Last Name ends with "Smith" |
contains | Checks if the string has a specific part inside it. | Last Name contains "John" |
does not contain | Checks if the string does not have a specific part inside it. | Zip code does not contain "560086" |
like | Looks for strings that match a pattern using wildcards like '%' for any characters.
| Like "Joh%" (finds "John", "Johnny") |
not like | Excludes strings that match a specific pattern.
| Not Like "@example.com" |
in | Checks if the string is one of several listed options.
| In USA, Canada, UK |
not in | Checks if the string is not one of listed options.
| Not In (USA, Canada, UK) |
matches (Regex) | Uses a pattern to find specific formats in the string regular expressions (regex). Regex allows you to search for patterns within text, such as specific formats like email addresses, phone numbers, or custom rules. |
|
is anything | Checks if the string has any value at all. | State is anything |
is same | Checks if the value of a field is exactly the same as the specified field. | First Name is same as Last Name |
Email Address is same as Contact Email | ||
is different | Checks if the value of a field is different from the specified field. | First Name is different from Last Name |
Email Address is different from Contact Email |