ComfyUI > Nodes > ComfyUI_StringOps > 判断是否包含字符(meeeyo.com)

ComfyUI Node: 判断是否包含字符(meeeyo.com)

Class Name

CheckSubstringPresence

Category
Meeeyo/String
Author
MeeeyoAI (Account age: 14days)
Extension
ComfyUI_StringOps
Latest Updated
2025-03-07
Github Stars
0.02K

How to Install ComfyUI_StringOps

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

判断是否包含字符(meeeyo.com) Description

Determine presence of specified substrings in text for text analysis and processing tasks, offering flexibility in requirements.

判断是否包含字符(meeeyo.com):

The CheckSubstringPresence node is designed to determine whether specific substrings are present within a given text. This node is particularly useful for text analysis and processing tasks where you need to verify the existence of certain keywords or phrases. It offers flexibility by allowing you to specify whether all specified substrings must be present or if the presence of any one of them is sufficient. This capability can be beneficial in scenarios such as content filtering, keyword detection, or text validation, where understanding the presence of certain terms can guide further actions or decisions.

判断是否包含字符(meeeyo.com) Input Parameters:

input_text

This parameter represents the text content in which you want to search for specific substrings. It is the main body of text that will be analyzed by the node. The input should be a string, and there is no strict limit on its length, allowing you to work with both short and long text passages. The default value is "文本内容", which means "text content" in Chinese, indicating that you should replace it with your actual text.

substring

This parameter specifies the substrings you are looking for within the input_text. You can provide multiple substrings separated by a pipe (|) character, allowing you to search for several terms at once. The default value is "查找符1|查找符2", which translates to "search term 1|search term 2", suggesting that you should replace these placeholders with the actual substrings you are interested in.

mode

The mode parameter determines the condition under which the node will return a positive result. It offers two options: "同时满足" (all must be present) and "任意满足" (any one must be present). The default setting is "任意满足", meaning that the presence of any one of the specified substrings will result in a positive outcome. This parameter allows you to tailor the node's behavior to your specific needs, whether you require all substrings to be present or just one.

判断是否包含字符(meeeyo.com) Output Parameters:

INT

The output is an integer value that indicates whether the specified condition has been met. A value of 1 signifies that the condition is satisfied, meaning that either all or any of the specified substrings are present in the input_text, depending on the mode selected. Conversely, a value of 0 indicates that the condition is not met, meaning that the required substrings are not present according to the specified mode.

判断是否包含字符(meeeyo.com) Usage Tips:

  • Use the "同时满足" mode when you need to ensure that all specified substrings are present in the text, which is useful for strict content validation.
  • Opt for the "任意满足" mode when you are interested in detecting the presence of any one of the substrings, which can be helpful for keyword spotting or flexible content filtering.

判断是否包含字符(meeeyo.com) Common Errors and Solutions:

Incorrect Substring Format

  • Explanation: The substrings should be separated by a pipe (|) character.
  • Solution: Ensure that you format the substring parameter correctly by using the pipe character to separate multiple substrings.

Invalid Mode Selection

  • Explanation: The mode must be either "同时满足" or "任意满足".
  • Solution: Verify that the mode parameter is set to one of the two valid options. If you encounter an error, check for typos or incorrect values.

Empty Input Text

  • Explanation: The input_text parameter is empty, leading to a default return value.
  • Solution: Provide a valid string for the input_text parameter to ensure the node can perform the substring check.

判断是否包含字符(meeeyo.com) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_StringOps
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 Playground, enabling artists to harness the latest AI tools to create incredible art.