ComfyUI Node
Simple String Replace
Sequential find/replace using 'find => replace' lines. Optional whole-word matching. Malformed lines are reported, not silently dropped.
Simple String Replace
- text
- ignored_lines
◄text—►
◄find_replace_pairsfind => replace
old => new►
◄whole_word_matchfalse►
CategoryMoonPack/string
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Source text. | |
| find_replace_pairs | STRING | find => replace old => new | One pair per line in 'find => replace' format. Empty replacement removes text. |
| whole_word_matchopt | BOOLEAN | false | If true, only complete words match (uses regex \b boundaries). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| ignored_lines | STRING | — |