Skip to main content

NotLike

Vasyl MartyniukLess than 1 minute

Assets if the left value is not similar to the right. The * (asterisk) symbol represents any character or wildcard. For example, the condition below returns true if the callback function GetUserCountry returns values like "Ukraine", "Brazil" or "Japan".

{
  "Condition": {
    "Like": {
      "${CALLBACK.GetUserCountry}": "A*"
    }
  }
}

The asterisk can be places can be places anywhere in the string. For example, the following condition check if current site name does not end with pets:

{
  "Condition": {
    "NotLike": {
      "${WP_OPTION.blogname}": "*pets"
    }
  }
}

Another example of the asterisk been places in the middle of the string:

{
  "Condition": {
    "NotLike": {
      "${USER_META.status}": "internal-*-writer"
    }
  }
}
Virtual Assistant