Visit ComfyUI Online for ready-to-use ComfyUI environment
Automate text search and replace tasks efficiently with detailed output and support for multiple replacements.
The Text Find and Replace node is designed to streamline the process of searching for specific text within a larger body of text and replacing it with a new string. This node is particularly useful for tasks that involve text manipulation, such as editing documents, preparing data for analysis, or generating dynamic content. By automating the find and replace functionality, it saves time and reduces the risk of manual errors. The node can handle multiple replacements and provides detailed output on the number of replacements made, making it a powerful tool for text processing.
This parameter represents the main body of text in which the search and replace operations will be performed. It is a required input and must be of type STRING
. The text provided here will be scanned for occurrences of the specified substring or pattern that needs to be replaced.
This parameter specifies the substring or pattern that you want to search for within the main text. It is a required input and must be of type STRING
. The node will look for this exact string within the text and replace it with the string provided in the replace
parameter. The default value is an empty string, and it does not support multiline input.
This parameter defines the new string that will replace the occurrences of the find
parameter within the main text. It is a required input and must be of type STRING
. The default value is an empty string, and it does not support multiline input. The replacements will be made sequentially, and the node will provide detailed output on the number of replacements made.
This output parameter contains the modified text after all the specified replacements have been made. It is of type STRING
and reflects the main text with all instances of the find
parameter replaced by the replace
parameter.
This output parameter provides the total number of replacements made as a numerical value. It is of type NUMBER
and helps in understanding the extent of changes made to the text.
This output parameter provides the total number of replacements made as a floating-point number. It is of type FLOAT
and is useful for applications that require floating-point precision.
This output parameter provides the total number of replacements made as an integer. It is of type INT
and is useful for applications that require integer precision.
find
parameter is correctly specified to avoid unintended replacements. Double-check for typos or incorrect patterns.replacement_count_number
, replacement_count_float
, and replacement_count_int
outputs to verify the number of replacements made, which can help in debugging and ensuring the accuracy of the operation.text
parameter must be of type STRING
.text
parameter is a valid string.find
parameter must be of type STRING
.find
parameter is a valid string.replace
parameter must be of type STRING
.replace
parameter is a valid string.find
string was not found in the text
.find
string is correctly specified and exists within the text
. Check for any typos or case sensitivity issues.© Copyright 2024 RunComfy. All Rights Reserved.