ComfyUI Node Runs on cloud
Replace Text (Regex)
Find and replace text using regex patterns.
Replace Text (Regex)
- STRING
◄string—►
◄regex_pattern—►
◄replace—►
◄case_insensitivetrue►
◄multilinefalse►
◄dotallfalse►
◄count0►
Categorytext
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — | |
| regex_pattern | STRING | — | |
| replace | STRING | — | |
| case_insensitiveopt | BOOLEAN | true | — |
| multilineopt | BOOLEAN | false | — |
| dotallopt | BOOLEAN | false | When enabled, the dot (.) character will match any character including newline characters. When disabled, dots won't match newlines. |
| countopt | INT | 00–100 | Maximum 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)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |