Nodes/ComfyUI_StringEssentials/String Multi Replace
ComfyUI Node

String Multi Replace

A ComfyUI node in utils/StringEssentials with 9 inputs and 1 output.

By bradsec·Created 2 years ago·Updated about a month ago· 35
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)

    NameTypeDefaultDescription
    input_stringSTRINGThe string to process
    replacement_pairsSTRINGEnter replacement pairs (one per line). Format: 'search<delimiter>replace'. Default delimiter is ':' (colon)
    replacement_delimiterSTRING::Character(s) that separate search and replace strings. Default is two '::' (colons)
    match_caseBOOLEANfalseWhen enabled, matching is case-sensitive.
    match_whole_stringBOOLEANfalseWhen enabled, only whole-word matches are replaced, not substrings inside other words.
    preserve_punctuationBOOLEANtrueWhen enabled, punctuation marks adjacent to matched text are preserved
    remove_extra_spacesBOOLEANtrueWhen enabled, collapses repeated spaces and trims the result after replacement.
    sort_by_lengthBOOLEANtrueWhen enabled, longer search strings are replaced first to prevent substring clobbering. Disable for input-order replacement.
    use_regexBOOLEANfalseWhen enabled, search strings are treated as regex patterns instead of literal text

    Outputs (1)

    NameTypeDescription
    modified_stringSTRING