Nodes/comfyui-moonpack/Simple String Replace (legacy)
ComfyUI Node

Simple String Replace (legacy)

Sequential find/replace using 'find => replace' lines. Optional whole-word matching. Malformed lines are reported, not silently dropped.

By moonwhaler·Created about a year ago·Updated 24 days ago· 15
Simple String Replace (legacy)
    • text
    • ignored_lines
    text
    find_replace_pairsfind => replace old => new
    whole_word_matchfalse
    CategoryMoonPack/string

    Inputs (3)

    NameTypeDefaultDescription
    textSTRINGSource text.
    find_replace_pairsSTRINGfind => replace old => newOne pair per line in 'find => replace' format. Empty replacement removes text.
    whole_word_matchoptBOOLEANfalseIf true, only complete words match (uses regex \b boundaries).

    Outputs (2)

    NameTypeDescription
    textSTRING
    ignored_linesSTRING