ComfyUI > Nodes > WAS Node Suite > Text Find

ComfyUI Node: Text Find

Class Name

Text Find

Category
WAS Suite/Text/Search
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 Find Description

Efficiently locate substrings or patterns in text for analysis, manipulation, and extraction.

Text Find:

The Text Find node is designed to help you locate specific substrings or patterns within a given text. This node is particularly useful for tasks that require text analysis or manipulation, such as searching for keywords, validating text formats, or extracting specific information from larger text bodies. By providing either a substring or a regular expression pattern, the node can efficiently determine if the specified text is present, making it a versatile tool for various text processing needs.

Text Find Input Parameters:

text

This parameter represents the main body of text in which you want to search for a substring or pattern. It is a required input and must be of type STRING. The text can be any length and contain any characters, providing the context for the search operation.

substring

This parameter allows you to specify a specific sequence of characters to search for within the main text. It is of type STRING and is optional. If provided, the node will check if this exact substring exists within the text. The default value is an empty string, and it does not support multiline input.

pattern

This parameter enables you to define a regular expression pattern to search for within the main text. It is of type STRING and is optional. If provided, the node will use this pattern to perform a more complex search, allowing for advanced text matching capabilities. The default value is an empty string, and it does not support multiline input.

Text Find Output Parameters:

found

This output parameter is of type BOOLEAN and indicates whether the specified substring or pattern was found within the main text. If the substring or pattern is present, the output will be True; otherwise, it will be False. This result helps you quickly determine the presence of the desired text within the larger body.

Text Find Usage Tips:

  • To search for a simple word or phrase, use the substring parameter for a straightforward and efficient search.
  • For more complex searches, such as finding text that matches a specific format or pattern, use the pattern parameter with a regular expression.
  • Ensure that the text parameter is correctly populated with the text you want to search within, as this is the primary context for the search operation.

Text Find Common Errors and Solutions:

Invalid regular expression pattern

  • Explanation: The pattern parameter contains an invalid regular expression.
  • Solution: Verify that the regular expression syntax is correct and conforms to the expected format.

Missing text input

  • Explanation: The text parameter is empty or not provided.
  • Solution: Ensure that the text parameter is populated with the text you want to search within.

Both substring and pattern provided

  • Explanation: Both substring and pattern parameters are provided, causing ambiguity in the search operation.
  • Solution: Provide only one of the substring or pattern parameters to avoid confusion and ensure the node performs the intended search.

Text Find 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.