ComfyUI Node: String Strip

Class Name

StringStrip

Category
utils/StringEssentials
Author
bradsec (Account age: 4314days)
Extension
ComfyUI_StringEssentials
Latest Updated
2026-03-09
Github Stars
0.03K

How to Install ComfyUI_StringEssentials

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

String Strip Description

StringStrip node removes specified substrings from text, offering options for case sensitivity and punctuation.

String Strip:

The StringStrip node is designed to streamline and enhance text processing by removing specified substrings from a given input string. This node is particularly useful for cleaning up text data by eliminating unwanted words or phrases, which can be crucial in preparing text for further processing or analysis. It offers flexibility through various options, such as case sensitivity, whole string matching, and punctuation preservation, allowing you to tailor the text stripping process to your specific needs. By efficiently handling multiple strings and normalizing spaces, the StringStrip node ensures that your text data is clean and ready for use in AI art projects or other creative endeavors.

String Strip Input Parameters:

input_string

This parameter represents the main text that you want to process. It is the source string from which specified substrings will be removed. The input string is required and must be provided for the node to function.

strings_to_remove

This parameter allows you to specify the substrings that you want to remove from the input string. You can enter multiple strings, each on a new line, and the node will attempt to remove each one from the input string. This parameter supports multiline input and is essential for defining the text elements you wish to eliminate.

match_case

This boolean parameter determines whether the removal process should be case-sensitive. When enabled, the node will only remove substrings that match the exact case specified in strings_to_remove. The default value is False, meaning the process is case-insensitive by default.

match_whole_string

This boolean parameter specifies whether the node should match and remove whole strings only. When enabled, the node will only remove substrings that match the entire string specified in strings_to_remove. The default value is True, ensuring that only complete matches are removed unless otherwise specified.

preserve_punctuation

This boolean parameter controls whether punctuation adjacent to matched text should be preserved. When enabled, punctuation marks next to the removed substrings will remain in the text. The default value is True, which helps maintain the readability of the text after processing.

remove_extra_spaces

This boolean parameter determines whether extra spaces should be removed from the text after the substrings have been stripped. When enabled, the node will normalize spaces, ensuring that the resulting text is clean and free of unnecessary whitespace. The default value is True.

String Strip Output Parameters:

modified_string

This output parameter provides the processed string after the specified substrings have been removed. It reflects the changes made based on the input parameters, such as case sensitivity, whole string matching, and punctuation preservation. The modified string is the final result of the node's operation, ready for further use or analysis.

String Strip Usage Tips:

  • To ensure accurate removal of specific phrases, list each phrase on a new line in the strings_to_remove parameter.
  • Use the match_case option to control whether the removal process should consider case differences, which can be useful for distinguishing between similar words with different meanings.
  • Enable preserve_punctuation to maintain the readability of your text, especially when removing words that are adjacent to punctuation marks.

String Strip Common Errors and Solutions:

Missing input_string

  • Explanation: The input_string parameter is required but was not provided.
  • Solution: Ensure that you supply a valid string to the input_string parameter before executing the node.

Invalid strings_to_remove format

  • Explanation: The strings_to_remove parameter may contain improperly formatted entries.
  • Solution: Check that each string to be removed is entered on a separate line and that there are no unintended characters or formatting issues.

Unexpected output due to case sensitivity

  • Explanation: The output may not match expectations if the match_case setting is not correctly configured.
  • Solution: Verify the match_case setting to ensure it aligns with your intended case sensitivity requirements. Adjust as necessary to achieve the desired result.

String Strip Related Nodes

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