Nodes/comfy-ovum/re.split (Regex Split)
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.

By sfinktah·Created 12 months ago·Updated 9 months ago· 6
re.split (Regex Split)
  • flags
  • parts
pattern
string
string_in
maxsplit0
Categoryovum/regex

Inputs (5)

NameTypeDefaultDescription
patternSTRINGThe regular expression pattern.
stringSTRINGThe string to search. Used if `string_in` is not connected.
string_inoptSTRINGInput string or list of strings. Overrides `string` widget if connected.
flagsoptRE_FLAGS2Regex compilation flags.
maxsplitoptINT0Maximum number of splits to perform. 0 means no limit.

Outputs (1)

NameTypeDescription
partsSTRING