ComfyUI > Nodes > Basic data handling > split (LIST)

ComfyUI Node: split (LIST)

Class Name

Basic data handling: RegexSplitList

Category
Basic/STRING/regex
Author
StableLlama (Account age: 861days)
Extension
Basic data handling
Latest Updated
2026-05-07
Github Stars
0.04K

How to Install Basic data handling

Install this extension via the ComfyUI Manager by searching for Basic data handling
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Basic data handling in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

split (LIST) Description

The RegexSplitList node splits strings into substrings using specified regex patterns for precise text parsing.

split (LIST):

The RegexSplitList node is designed to facilitate the splitting of strings into a list of substrings based on a specified regular expression pattern. This node is particularly useful when you need to break down a string into manageable parts, such as separating words, phrases, or other elements that are delineated by specific patterns. By leveraging regular expressions, this node provides a powerful and flexible way to handle complex string splitting tasks, allowing you to define intricate patterns for splitting beyond simple delimiters. This capability is essential for tasks that require precise control over how strings are divided, making it a valuable tool for data parsing and text processing in creative AI projects.

split (LIST) Input Parameters:

string

The string parameter represents the input text that you want to split into a list of substrings. This parameter is crucial as it contains the data that will be processed by the node. The string can be any sequence of characters, including words, sentences, or even entire paragraphs. There are no specific minimum or maximum length constraints, but the content should be relevant to the pattern you intend to use for splitting.

pattern

The pattern parameter is a regular expression that defines the criteria for splitting the input string. This parameter is essential because it determines where the splits will occur within the string. Regular expressions allow for complex and flexible pattern matching, enabling you to specify precise conditions for splitting. There are no default values, as the pattern must be explicitly defined to suit the specific splitting requirements of your task.

split (LIST) Output Parameters:

LIST

The output of the RegexSplitList node is a LIST of substrings, which are the result of splitting the input string based on the specified pattern. This list contains all the segments of the original string that were separated by matches of the pattern. The output is significant because it provides a structured way to access and manipulate individual parts of the string, facilitating further processing or analysis in your workflow.

split (LIST) Usage Tips:

  • Use simple patterns like ,\s* to split strings by commas followed by optional spaces, which is useful for parsing CSV-like data.
  • For splitting based on whitespace, use the pattern \s+ to handle multiple spaces, tabs, or newlines, ensuring that all types of whitespace are considered.
  • Test your regular expression patterns using online regex testers to ensure they match the intended parts of your string before applying them in the node.

split (LIST) Common Errors and Solutions:

Invalid regular expression

  • Explanation: This error occurs when the pattern provided is not a valid regular expression.
  • Solution: Double-check the syntax of your regular expression. Ensure that all special characters are properly escaped and that the pattern is correctly structured.

Empty string input

  • Explanation: If the input string is empty, the node will return a list containing a single empty string.
  • Solution: Ensure that the input string is not empty before processing. If necessary, add a check to handle empty strings appropriately in your workflow.

No matches found

  • Explanation: When the pattern does not match any part of the string, the entire string is returned as a single element in the list.
  • Solution: Verify that the pattern is correctly defined to match the intended parts of the string. Adjust the pattern as needed to ensure it captures the desired segments.

split (LIST) Related Nodes

Go back to the extension to check out more related nodes.
Basic data handling
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

split (LIST)