Nodes/ComfyUI/Replace Text (Regex)
ComfyUI Node Runs on cloud

Replace Text (Regex)

Find and replace text using regex patterns.

By Comfy-Org·Created 4 years ago·Updated 16 days ago· 121,575
Replace Text (Regex)
    • STRING
    string
    regex_pattern
    replace
    case_insensitivetrue
    multilinefalse
    dotallfalse
    count0
    Categorytext

    Inputs (7)

    NameTypeDefaultDescription
    stringSTRING
    regex_patternSTRING
    replaceSTRING
    case_insensitiveoptBOOLEANtrue
    multilineoptBOOLEANfalse
    dotalloptBOOLEANfalseWhen enabled, the dot (.) character will match any character including newline characters. When disabled, dots won't match newlines.
    countoptINT00–100Maximum number of replacements to make. Set to 0 to replace all occurrences (default). Set to 1 to replace only the first match, 2 for the first two matches, etc.

    Outputs (1)

    NameTypeDescription
    STRINGSTRING