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

ComfyUI Node: split (data list)

Class Name

Basic data handling: RegexSplitDataList

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 (data list) Description

RegexSplitDataList node splits strings into substrings using regex patterns for text processing.

split (data list):

The "Basic data handling: RegexSplitDataList" node is designed to facilitate the division of a string into a list of substrings based on a specified regular expression pattern. This node is particularly useful when you need to process or analyze text data by breaking it down into manageable parts. By leveraging regular expressions, you can define complex patterns for splitting, allowing for flexible and powerful text manipulation. This capability is essential for tasks such as data cleaning, parsing structured text, or preparing data for further analysis. The node's primary function is to identify matches of the pattern within the string and split the string at each match, returning the resulting substrings as a list. This approach provides a robust solution for handling diverse text processing needs, making it an invaluable tool for AI artists working with textual data.

split (data list) Input Parameters:

string

The string parameter represents the text input that you want to split into substrings. It is the main body of text that will be processed by the node. The content of this parameter directly affects the output, as it determines the text that will be divided based on the specified pattern. There are no specific minimum or maximum values for this parameter, as it can be any string of text.

pattern

The pattern parameter is a regular expression that defines the criteria for splitting the string. This pattern is used to identify the points within the string where it should be divided. The choice of pattern significantly impacts the results, as it dictates how the text is segmented. Regular expressions allow for a wide range of patterns, from simple character matches to complex sequences, providing flexibility in text processing. There are no default values, as the pattern must be explicitly defined to suit the specific text manipulation task.

split (data list) Output Parameters:

LIST

The output parameter is a LIST, which contains the substrings resulting from the split operation. Each element in the list represents a segment of the original string that was separated based on the specified pattern. This output is crucial for further processing or analysis, as it provides a structured way to handle the divided text. The list format allows for easy iteration and manipulation of the substrings, enabling efficient data handling and transformation.

split (data 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 text based on whitespace, use the pattern \s+ to handle multiple spaces, tabs, or newlines effectively.
  • 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 (data 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 string parameter is empty, the output will be 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 (data 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 (data list)