Text Operations
Find and Replace Node
Find and replace words in a given text
This node allows you to find and replace words in a given text.
Node Inputs
- Text to manipulate: The text you want to perform find and replace on
- Type:
Text
- Type:
- Find Word: The text to find
- Type:
Text
- Type:
- Replace With: The text to replace the found text with
- Type:
Text
- Type:
Node Outputs
- Processed Text: The final text with found words replaced
- Type:
Text
- Example usage:
{{find_and_replace_0.processed_text}}
- Type:
Example
The below example is a pipeline that takes in a text and finds and replaces the word “John Smith” with “Tom Wilson”.
- Text Node: Contains the text “my name is John Smith” (the text that we will do find and replace on)
- Find and Replace Node: Finds and replaces the word “John Smith” with “Tom Wilson”
- Text to manipulate:
{{text_0.text}}
- Find Word:
John Smith
- Replace With:
Tom Wilson
- Text to manipulate:
- Output: display the new text
- Output:
{{find_and_replace_0.processed_text}}
- Output: