ComfyUI > Nodes > Basic data handling > search named groups

ComfyUI Node: search named groups

Class Name

Basic data handling: RegexGroupDict

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

search named groups Description

Extracts named groups from strings using regex, returning segments as a dictionary for clarity.

search named groups:

The "Basic data handling: RegexGroupDict" node is designed to facilitate the extraction of named groups from a string using regular expressions. This node is particularly useful when you need to parse structured data from text, such as extracting specific fields from a log entry or parsing user input. By leveraging the power of regular expressions, this node allows you to define patterns with named groups, which can then be used to capture and return specific segments of the input string as a dictionary. This approach not only simplifies the process of data extraction but also enhances readability and maintainability by allowing you to refer to captured data by meaningful names rather than relying on positional indices.

search named groups Input Parameters:

string

The string parameter represents the input text that you want to search through using the regular expression pattern. This parameter is crucial as it contains the data from which named groups will be extracted. There are no specific minimum or maximum values for this parameter, but it should be a valid string that you wish to analyze.

pattern

The pattern parameter is a regular expression string that defines the search pattern, including named groups, to be applied to the input string. This pattern should be crafted carefully to match the desired segments of the input text. The use of named groups within the pattern allows for the extraction of specific parts of the string into a dictionary format. There are no specific constraints on this parameter, but it must be a valid regular expression.

search named groups Output Parameters:

DICT

The output of this node is a dictionary (DICT) containing the named groups extracted from the input string. Each key in the dictionary corresponds to a named group defined in the regular expression pattern, and the associated value is the portion of the input string that matched that group. If no match is found, the node returns an empty dictionary. This output format is particularly useful for organizing and accessing extracted data in a structured manner.

search named groups Usage Tips:

  • Ensure that your regular expression pattern includes named groups using the syntax (?P...) to effectively capture and label the desired segments of the input string.
  • Test your regular expression pattern with sample data to verify that it correctly identifies and extracts the intended groups before using it in production scenarios.

search named groups Common Errors and Solutions:

Invalid regular expression pattern

  • Explanation: This error occurs when the provided pattern is not a valid regular expression.
  • Solution: Double-check the syntax of your regular expression pattern to ensure it adheres to the correct format and includes named groups where necessary.

No match found

  • Explanation: This situation arises when the input string does not contain any segments that match the provided pattern.
  • Solution: Verify that the input string contains the expected data and that the pattern is correctly defined to match the desired segments. Adjust the pattern if necessary to ensure it aligns with the structure of the input data.

search named groups 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.

search named groups