Visit ComfyUI Online for ready-to-use ComfyUI environment
Efficiently locate substrings or patterns in text for analysis, manipulation, and extraction.
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.
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.
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.
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.
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.
substring
parameter for a straightforward and efficient search.pattern
parameter with a regular expression.text
parameter is correctly populated with the text you want to search within, as this is the primary context for the search operation.pattern
parameter contains an invalid regular expression.text
parameter is empty or not provided.text
parameter is populated with the text you want to search within.substring
and pattern
parameters are provided, causing ambiguity in the search operation.substring
or pattern
parameters to avoid confusion and ensure the node performs the intended search.© Copyright 2024 RunComfy. All Rights Reserved.