Node Inputs

The node accepts the following inputs:

  • replacements: A list of objects that specify the words to be found and their respective replacement words. Each object comprises two parts:

    • find word: The word to be searched for within the input text.
    • replace with: The word that will replace each occurrence of the find word.
  • input: The text on which the find and replace operations will be carried out.

Node Output

The node outputs the following:

  • output string: The resulting text after all instances of the specified words have been replaced.

Node Functionality

The Find And Replace node has a relatively straightforward job. It searches through a provided piece of text (input) and looks for certain words or phrases. Each time it finds a specified word or phrase (find word), it replaces it with another word or phrase (replace with) provided by the user. This process is repeated for each pair of find and replace terms specified in the replacements input.

When To Use

Use the Find And Replace node when you need to update text by replacing specific words, phrases, or characters. This can be useful in many scenarios, including:

  • Editing documents to replace outdated terms with updated terminology.
  • Cleaning up and formatting data by replacing unwanted characters or correcting recurring spelling errors.
  • Preparing customized messages by replacing placeholder tags with actual content, such as names or dates.

Its ability to handle a list of replacements at once makes this node incredibly useful for automating repetitive text editing tasks, ensuring consistency and saving time. Whether you’re processing a single text or list of text, the Find And Replace node can help streamline your data manipulation workflows.