Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-PainterNodes > Painter String Cleaner

ComfyUI Node: Painter String Cleaner

Class Name

PainterStringCleaner

Category
PainterNodes
Author
princepainter (Account age: 1255days)
Extension
ComfyUI-PainterNodes
Latest Updated
2026-07-14
Github Stars
0.14K

How to Install ComfyUI-PainterNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-PainterNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-PainterNodes 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

Painter String Cleaner Description

Streamline text processing by removing unwanted patterns with regular expressions for AI artists creating text-based art.

Painter String Cleaner:

The PainterStringCleaner node is designed to streamline and enhance text processing by removing unwanted patterns from strings. This node is particularly useful for AI artists who need to clean up text data, such as removing specific characters or patterns that may interfere with their creative processes. By utilizing regular expressions, the node efficiently identifies and eliminates specified patterns, replacing them with a desired string or leaving them blank. This functionality is crucial for maintaining clean and organized text data, which can be essential for various artistic applications, such as generating text-based art or preparing text for further processing in other nodes. The PainterStringCleaner node simplifies the task of text cleaning, making it accessible even to those without a technical background, and ensures that your text data is free from unwanted clutter.

Painter String Cleaner Input Parameters:

text

The text parameter is the main input for the node, where you provide the string that you want to clean. This parameter supports multiline text, allowing you to input large blocks of text that may contain unwanted patterns. The function of this parameter is to serve as the source material from which specified patterns will be removed or replaced. There are no specific minimum or maximum values for this parameter, as it can handle any string length that your system's memory can accommodate.

eliminate_pattern

The eliminate_pattern parameter specifies the pattern you want to remove from the input text. This pattern is defined as a string, typically consisting of two characters that act as delimiters. The node uses these delimiters to identify the sections of text to be removed. The default value for this parameter is [], which means that if no specific pattern is provided, the node will not perform any cleaning. The impact of this parameter is significant, as it determines what parts of the text will be targeted for removal.

replace_with

The replace_with parameter allows you to specify a string that will replace the eliminated patterns in the text. By default, this parameter is set to an empty string, meaning that the identified patterns will be removed entirely. However, you can provide any string to replace the patterns, which can be useful if you want to substitute the unwanted text with something else. This parameter gives you control over the final appearance of the cleaned text.

Painter String Cleaner Output Parameters:

original_text

The original_text output parameter provides the original input text without any modifications. This output is important as it allows you to compare the cleaned text with the original, ensuring that the cleaning process has been executed correctly and that no unintended changes have been made to the text.

cleaned_text

The cleaned_text output parameter contains the text after the specified patterns have been removed or replaced. This output is the primary result of the node's operation, reflecting the cleaned version of the input text. It is crucial for verifying that the unwanted patterns have been successfully eliminated and that the text is now ready for further use or processing.

Painter String Cleaner Usage Tips:

  • Ensure that the eliminate_pattern parameter is correctly set with the desired delimiters to effectively target the unwanted text sections.
  • Use the replace_with parameter to substitute patterns with meaningful text if complete removal is not desired, which can be useful for maintaining text structure.

Painter String Cleaner Common Errors and Solutions:

Pattern not found

  • Explanation: This error occurs when the specified eliminate_pattern does not match any part of the input text.
  • Solution: Double-check the eliminate_pattern to ensure it accurately represents the delimiters of the unwanted text sections.

Empty eliminate_pattern

  • Explanation: If the eliminate_pattern is left empty or is too short, the node will not perform any cleaning.
  • Solution: Provide a valid pattern with at least two characters to enable the node to identify and remove unwanted text sections.

Painter String Cleaner Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-PainterNodes
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.

Painter String Cleaner