ComfyUI Node
Text Replace
Replace words in text from one line of rules: `green:red, orange:black`. All swaps happen at once, so `red:blue, blue:red` swaps them. `orange:` deletes. Use \, or \: for a literal comma or colon.
Text Replace
- text
◄text—►
◄replace►
◄whole_wordstrue►
◄match_casefalse►
CategoryNynxz/Utils
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | The text to change. | |
| replace | STRING | find:replace pairs, comma separated — e.g. green:red, orange:black | |
| whole_wordsopt | BOOLEAN | true | Only whole words: `green` leaves `greenery` alone. |
| match_caseopt | BOOLEAN | false | Off: `green` also finds `Green` and `GREEN`, and the replacement follows their case. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |