String Operators
    • Dark
      Light

    String Operators

    • Dark
      Light

    Article summary

    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.

    Note

    The input value is case sensitive.

    First Name begins with "John"

    ends with

    Checks if the string ends with certain characters.

    Note

    The input value is case sensitive.

    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.

    Note

    The input value is case sensitive.

    Like "Joh%" (finds "John", "Johnny")

    not like

    Excludes strings that match a specific pattern.

    Note

    The input value is case sensitive.

    Not Like "@example.com"

    in

    Checks if the string is one of several listed options.

    Note

    When you provide multiple values, comma is mandatory as a separator.

    In USA, Canada, UK

    not in

    Checks if the string is not one of listed options.

    Note

    When you provide multiple values, comma is mandatory as a separator.

    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.

    • Email Matches .*@example\.com

      Explanation: This matches any email address that ends with @example.com.

    • Home Matches \d{10}

      Explanation: This matches any Home phone number with exactly 10 digits.

    • Zip code Matches ^9\d{4}

      Explanation: This matches ZIP codes that begin with a 9 followed by 4 digits.

    • Birth Date Matches d{4}-d{2}-\d{2} Explanation: This matches dates in the format YYYY-MM-DD, like 1990-05-23

    • Product Code Matches ^A\d{5} Explanation: This matches any product code that starts with an "A" followed by 5 digits.

    • Agent Comments Matches (?i)\bpurchase\b Explanation: This matches any Agent comment that contains the word "purchase", ignoring case sensitivity.

    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


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence