Visit ComfyUI Online for ready-to-use ComfyUI environment
Detect character presence in text for analysis and processing tasks, aiding in text validation and content filtering.
The CharacterInText
node is designed to help you determine the presence of a specific character within a given text. This node is particularly useful for text analysis and processing tasks where identifying the occurrence of certain characters is essential. By leveraging this node, you can easily check if a character exists in the text and get a corresponding result that can be used in further processing or decision-making workflows. This functionality is beneficial for various applications, including text validation, content filtering, and automated text generation.
This parameter represents the input text in which you want to search for a specific character. It accepts a string input and supports multiline text. The text you provide here will be analyzed to check for the presence of the specified character.
This parameter specifies the character you are looking for within the input text. It accepts a string input, and you can provide any character or sequence of characters. The node will perform a case-insensitive search to determine if this character exists in the text.
This parameter defines the starting index for the search operation. It accepts an integer value, with a default value of 1. The minimum value is 0, and the maximum value is 1024. This parameter allows you to specify where the search should begin, which can be useful for skipping certain parts of the text or focusing on specific sections.
The output of this node is an integer value. If the specified character is found in the text, the output will be the sum of 1 and the start_index
value. If the character is not found, the output will be equal to the start_index
value. This output helps you understand whether the character was present in the text and provides a numerical result that can be used in subsequent processing steps.
start_index
parameter to skip over parts of the text that you are not interested in, which can optimize the search process for large texts.character
parameter is empty or contains invalid characters.character
parameter is not empty and contains valid characters for the search.start_index
parameter is set to a value outside the allowed range (0 to 1024).start_index
parameter to a value within the allowed range to ensure proper operation of the node.© Copyright 2024 RunComfy. All Rights Reserved.