Skip to main content

What does this node do?

Performs search and replace operations on text, supporting both simple strings and regex patterns.

Configuration

text
string
required
Text to process.
find
string
required
Pattern to find.
replace
string
required
Replacement text.
use_regex
boolean
default:"false"
Treat find pattern as regex.
case_sensitive
boolean
default:"true"
Case-sensitive matching.
replace_all
boolean
default:"true"
Replace all occurrences.

Output

{
  "result": "Modified text...",
  "replacements": 5
}

Examples

Simple replacement

Find: "old"
Replace: "new"

Regex replacement

Find: \d{4}-\d{2}-\d{2}
Replace: [DATE]

Remove patterns

Find: <script.*?</script>
Replace: (empty)