ComfyUI Node
Regex String Replace (legacy)
Regex find/replace with case-insensitive, multiline, and dotall flags. Supports a non-destructive test_mode that highlights matches with >>>...<<<.
Regex String Replace (legacy)
- text
- match_count
◄text—►
◄pattern—►
◄replacement—►
◄case_insensitivefalse►
◄multilinefalse►
◄dotallfalse►
◄test_modefalse►
CategoryMoonPack/string
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | Source text. | |
| pattern | STRING | Python regex pattern. | |
| replacement | STRING | Replacement string. Use \1, \2, … for capture groups. | |
| case_insensitiveopt | BOOLEAN | false | Apply re.IGNORECASE. |
| multilineopt | BOOLEAN | false | Apply re.MULTILINE (^/$ match line boundaries). |
| dotallopt | BOOLEAN | false | Apply re.DOTALL (. matches newlines). |
| test_modeopt | BOOLEAN | false | Highlight matches with >>>…<<< instead of replacing. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| match_count | INT | — |