ComfyUI Node
String Multi Replace
A ComfyUI node in utils/StringEssentials with 9 inputs and 1 output.
String Multi Replace
- modified_string
◄input_string—►
◄replacement_pairs►
◄replacement_delimiter::►
◄match_casefalse►
◄match_whole_stringfalse►
◄preserve_punctuationtrue►
◄remove_extra_spacestrue►
◄sort_by_lengthtrue►
◄use_regexfalse►
Categoryutils/StringEssentials
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| input_string | STRING | The string to process | |
| replacement_pairs | STRING | Enter replacement pairs (one per line). Format: 'search<delimiter>replace'. Default delimiter is ':' (colon) | |
| replacement_delimiter | STRING | :: | Character(s) that separate search and replace strings. Default is two '::' (colons) |
| match_case | BOOLEAN | false | When enabled, matching is case-sensitive. |
| match_whole_string | BOOLEAN | false | When enabled, only whole-word matches are replaced, not substrings inside other words. |
| preserve_punctuation | BOOLEAN | true | When enabled, punctuation marks adjacent to matched text are preserved |
| remove_extra_spaces | BOOLEAN | true | When enabled, collapses repeated spaces and trims the result after replacement. |
| sort_by_length | BOOLEAN | true | When enabled, longer search strings are replaced first to prevent substring clobbering. Disable for input-order replacement. |
| use_regex | BOOLEAN | false | When enabled, search strings are treated as regex patterns instead of literal text |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| modified_string | STRING | — |