Blog
Booth AI
STABLE

Find and Replace

This node automates the process of searching for specific words or phrases within a text and replacing them with alternatives specified by the user. It's designed to iterate over the text, identifying each instance of the words to be found, and substituting them with their designated replacements. This functionality is crucial for editing texts, where certain terms or phrases need to be updated across a document or dataset efficiently. Whether for correcting spelling errors, updating terminology, or customizing messages, this node streamlines text manipulation tasks by allowing bulk replacements in a single operation. Inputs: - replacements: A list detailing words/phrases to find and their replacements. - input: The text to perform find-and-replace operations on. Output: - A modified string with all specified words/phrases replaced.

Inputs
Replacements
A dictionary which specifies the words to be found (keys) and their respective replacement words (values). For example: {"word_to_be_found":"replacement_word", "word_to_be_found_2":"replacement_word_2"}
Input Text
The text on which the find and replace operations will be carried out.
Outputs
Value
The output string