ComfyUI Node
re.split (Regex Split)
re.split(pattern, string, maxsplit=0, flags=0) Split string[s] by the occurrences of pattern. If capturing parentheses are used in pattern, then the text of all groups in the pattern are also returned as part of the resulting list. If maxsplit is nonzero, at most maxsplit splits occur.
re.split (Regex Split)
- flags
- parts
◄pattern►
◄string►
◄string_in—►
◄maxsplit0►
Categoryovum/regex
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| pattern | STRING | The regular expression pattern. | |
| string | STRING | The string to search. Used if `string_in` is not connected. | |
| string_inopt | STRING | Input string or list of strings. Overrides `string` widget if connected. | |
| flagsopt | RE_FLAGS | 2 | Regex compilation flags. |
| maxsplitopt | INT | 0 | Maximum number of splits to perform. 0 means no limit. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| parts | STRING | — |