ComfyUI Node
Text Replacer
Applies find/replace pairs to input text. Supports regex and case-insensitive matching.
Text Replacer
- pairs
- result
- pairs
- changes_log
- replacement_count
◄input_text►
◄use_regexfalse►
◄case_sensitivetrue►
◄replace_alltrue►
Categorytext/replace
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| pairs | FR_PAIRS | Find/Replace pairs from the FindReplacePairs node | |
| input_text | STRING | — | |
| use_regexopt | BOOLEAN | false | Treat find patterns as regular expressions |
| case_sensitiveopt | BOOLEAN | true | Whether replacements are case-sensitive |
| replace_allopt | BOOLEAN | true | Replace all occurrences (vs only first) |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| result | STRING | The text after all replacements have been applied |
| pairs | FR_PAIRS | The find/replace pairs (passed through for chaining) |
| changes_log | STRING | Log of all replacements made |
| replacement_count | INT | Total number of replacements performed |