Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates text segment extraction by splitting based on delimiter and selecting by index for structured data processing.
The SplitAndExtractText
node is designed to facilitate the extraction of specific segments from a block of text by splitting it based on a specified delimiter and then selecting a particular segment by its index. This node is particularly useful for processing structured text data where you need to isolate and work with specific parts of the text. By allowing you to choose the order of extraction and whether to include the delimiter in the output, this node provides flexibility in handling text data. Its primary goal is to streamline the process of text manipulation, making it easier to extract meaningful information from larger text bodies without requiring extensive manual editing.
This parameter represents the text that you want to process. It can be a multiline string, allowing you to work with paragraphs or lists. The input text is the source from which segments will be extracted based on the specified delimiter and index.
The delimiter is a string that defines how the input text should be split into segments. By default, it is set to "分隔符", but you can specify any string that suits your text structure. The choice of delimiter directly impacts how the text is divided and, consequently, which segments are available for extraction.
The index parameter determines which segment of the split text will be extracted. It is an integer value starting from 1, with a default value of 1. This parameter allows you to specify the exact segment you want to retrieve, making it crucial for targeted text extraction.
This parameter allows you to choose the order in which the segments are considered for extraction. It offers two options: "顺序" (sequential order) and "倒序" (reverse order), with the default being "顺序". This flexibility enables you to extract segments from the beginning or end of the text, depending on your needs.
A boolean parameter that specifies whether the delimiter should be included in the extracted segment. By default, it is set to False. Including the delimiter can be useful if the delimiter itself carries meaningful information or if you need to maintain the original text structure in the output.
The output is a single string that represents the extracted segment from the input text. This string is the result of splitting the input text by the specified delimiter and selecting the segment at the given index. The output will reflect the order and inclusion of the delimiter as specified by the input parameters.
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.