Visit ComfyUI Online for ready-to-use ComfyUI environment
Automate text search and replace operations for efficient text manipulation and consistency in data.
The Text Find and Replace Input node is designed to streamline the process of searching for specific text within a given string and replacing it with another specified text. This node is particularly useful for tasks that involve text manipulation, such as correcting typos, updating terminology, or customizing text content dynamically. By automating the find-and-replace operation, it saves you time and ensures consistency across your text data. The node performs a sequential search and replace, ensuring that each instance of the target text is replaced one by one, which can be crucial for maintaining the intended structure and meaning of the text.
This parameter represents the input text in which the search and replace operation will be performed. It is the main body of text that you want to modify. The type of this parameter is determined by TEXT_TYPE
, and it is required for the node to function. The forceInput
attribute ensures that this parameter is always provided.
This parameter specifies the text string that you want to search for within the input text. It is the target text that will be replaced. Similar to the text
parameter, its type is determined by TEXT_TYPE
, and it is required for the operation. The forceInput
attribute ensures that this parameter is always provided.
This parameter defines the text string that will replace each occurrence of the find
text within the input text. It is the new text that will be inserted in place of the target text. The type of this parameter is also determined by TEXT_TYPE
, and it is required for the operation. The forceInput
attribute ensures that this parameter is always provided.
This output parameter contains the modified text after all instances of the find
text have been replaced with the replace
text. It reflects the final result of the find-and-replace operation.
This output parameter provides the count of replacements made as a number. It indicates how many times the find
text was found and replaced within the input text.
This output parameter provides the count of replacements made as a floating-point number. It serves the same purpose as replacement_count_number
but in a different numerical format.
This output parameter provides the count of replacements made as an integer. It serves the same purpose as replacement_count_number
but in a different numerical format.
find
parameter accurately matches the text you want to replace, including case sensitivity, to avoid unexpected results.replace
parameter to insert dynamic or updated content into your text, which can be particularly useful for template-based text generation.result_text
output to ensure that the replacements have been made correctly and that the text structure remains intact.text
, find
, and replace
parameters are all provided as strings.find
parameter is an empty string.find
parameter to specify the text you want to search for.text
parameter is not provided or is None
.text
parameter is provided and is a valid string.© Copyright 2024 RunComfy. All Rights Reserved.