ComfyUI > Nodes > Basic data handling > rsplit (from LIST)

ComfyUI Node: rsplit (from LIST)

Class Name

Basic data handling: StringRsplitList

Category
Basic/STRING
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

rsplit (from LIST) Description

StringRsplitList splits a string into substrings from the right using a specified separator and max splits.

rsplit (from LIST):

The StringRsplitList node is designed to split a given string into a list of substrings, starting from the rightmost end of the string. This node is particularly useful when you need to break down a string into its constituent parts based on a specified separator, but you want to control the splitting process from the end of the string rather than the beginning. This can be especially beneficial in scenarios where the structure of the string is such that the most relevant or significant parts are located towards the end. By allowing you to specify a maximum number of splits, the node provides flexibility in how the string is divided, ensuring that you can tailor the output to meet your specific needs. If no separator is specified, the node defaults to using whitespace as the separator, making it versatile for a variety of string formats.

rsplit (from LIST) Input Parameters:

string

The string parameter is the main input for the node, representing the text that you want to split. It is a required parameter and should be provided as a string. The default value is an empty string (""), which means if no input is given, the node will not perform any operation. This parameter is crucial as it determines the content that will be processed and split into a list.

sep

The sep parameter specifies the separator at which the string will be split. It is an optional parameter, and if not provided or set to an empty string (""), the node will use any whitespace as the default separator. This parameter allows you to define the character or sequence of characters that will be used to identify the points at which the string should be divided. By customizing this parameter, you can control how the string is parsed and ensure that the resulting list meets your expectations.

maxsplit

The maxsplit parameter determines the maximum number of splits that will be performed on the string. It is an optional parameter with a default value of -1, which indicates that there is no limit on the number of splits, and the entire string will be processed. If a positive integer is provided, the node will perform at most that many splits, starting from the right. This parameter is useful for controlling the granularity of the split operation, allowing you to focus on the most relevant parts of the string.

rsplit (from LIST) Output Parameters:

LIST

The output of the StringRsplitList node is a LIST of strings. This list contains the substrings that result from splitting the input string based on the specified separator and the maximum number of splits. Each element in the list represents a segment of the original string, providing a structured way to access and manipulate the individual components. This output is essential for tasks that require further processing or analysis of the string's parts, enabling you to work with each substring independently.

rsplit (from LIST) Usage Tips:

  • Use the sep parameter to specify a custom separator if your string contains specific delimiters, such as commas or semicolons, to ensure accurate splitting.
  • Adjust the maxsplit parameter to control the number of splits, especially when dealing with strings where only the last few segments are of interest.
  • If your string contains multiple spaces or tabs, leaving the sep parameter empty will automatically handle these as separators, simplifying the splitting process.

rsplit (from LIST) Common Errors and Solutions:

Empty string input

  • Explanation: If the string parameter is left empty, the node will not perform any operation, resulting in an empty list.
  • Solution: Ensure that the string parameter is populated with the text you wish to split before executing the node.

Invalid separator

  • Explanation: Providing a separator that does not exist in the string will result in the entire string being returned as a single element in the list.
  • Solution: Verify that the sep parameter matches the actual delimiters present in the string to achieve the desired split.

Negative maxsplit value

  • Explanation: A maxsplit value of -1 indicates no limit on splits, which might not be suitable for all use cases.
  • Solution: Set a positive integer for maxsplit if you need to limit the number of splits performed on the string.

rsplit (from 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.

rsplit (from LIST)