ComfyUI > Nodes > WAS Node Suite > Text Contains

ComfyUI Node: Text Contains

Class Name

Text Contains

Category
WAS Suite/Logic
Author
WASasquatch (Account age: 4688days)
Extension
WAS Node Suite
Latest Updated
2024-08-25
Github Stars
1.07K

How to Install WAS Node Suite

Install this extension via the ComfyUI Manager by searching for WAS Node Suite
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter WAS Node Suite in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Text Contains Description

Determines presence of specific substring in text for analysis, validation, and filtering, with case-insensitive search option.

Text Contains:

The Text Contains node is designed to help you determine if a specific substring exists within a given text. This node is particularly useful for tasks that involve text analysis, validation, or filtering, where you need to check for the presence of certain keywords or phrases. By leveraging this node, you can streamline your workflow by automating the process of text searching, making it easier to handle large volumes of text data efficiently. The node offers an option to perform case-insensitive searches, ensuring flexibility and accuracy in various scenarios.

Text Contains Input Parameters:

text

This parameter represents the main text in which you want to search for a substring. It is a string input where you can provide any text content. The default value is an empty string (''). The text parameter is crucial as it serves as the primary source for the search operation.

sub_text

This parameter is the substring you are looking to find within the main text. It is also a string input, and you can specify any sequence of characters you want to search for. The default value is an empty string (''). The sub_text parameter is essential because it defines the specific content you are trying to locate in the main text.

case_insensitive

This optional parameter determines whether the search should be case-insensitive. It is a boolean input, with the default value set to True. When enabled, the node will ignore case differences between the text and sub_text, making the search more flexible. If set to False, the search will be case-sensitive, meaning it will only find exact matches with the same letter casing.

Text Contains Output Parameters:

BOOLEAN

The output of this node is a boolean value that indicates whether the sub_text was found within the main text. If the substring is present, the output will be True; otherwise, it will be False. This output is crucial for decision-making processes in your workflow, allowing you to branch or filter actions based on the presence of specific text.

Text Contains Usage Tips:

  • Use the case_insensitive parameter to ensure your searches are flexible and can handle variations in letter casing, especially when dealing with user-generated content.
  • Combine this node with other text processing nodes to create complex text analysis workflows, such as filtering out entries that do not contain certain keywords.
  • Utilize the Text Contains node in validation processes to check if required phrases or terms are included in user inputs or documents.

Text Contains Common Errors and Solutions:

No text provided

  • Explanation: The text parameter is empty or not provided.
  • Solution: Ensure that you input a valid string in the text parameter before executing the node.

No sub_text provided

  • Explanation: The sub_text parameter is empty or not provided.
  • Solution: Make sure to specify the substring you want to search for in the sub_text parameter.

Invalid case_insensitive value

  • Explanation: The case_insensitive parameter is not a boolean value.
  • Solution: Verify that the case_insensitive parameter is set to either True or False.

Text Contains Related Nodes

Go back to the extension to check out more related nodes.
WAS Node Suite
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.