Visit ComfyUI Online for ready-to-use ComfyUI environment
Extract specific string segments using defined markers for text processing tasks like data extraction and text analysis.
The substring
node is designed to extract specific portions of a given string based on defined start and end markers. This node is particularly useful for isolating segments of text within larger strings, which can be beneficial in various text processing tasks. By specifying the start and end markers, you can precisely control which part of the string you want to extract. If no markers are provided, the entire input string is returned. This functionality is essential for tasks that require text segmentation, such as data extraction, text analysis, and preprocessing for machine learning models.
This is the main string from which you want to extract a substring. It can be a multiline string, allowing for flexibility in handling various text formats. The content of this string will be processed based on the provided start and end markers. There are no specific minimum or maximum values for this parameter, but it should be a valid string.
This optional parameter defines the starting point of the substring. If provided, the extraction will begin immediately after this marker. If left empty, the extraction will start from the beginning of the input string. This allows for dynamic and flexible text extraction based on different starting points within the string.
This optional parameter defines the ending point of the substring. If provided, the extraction will stop just before this marker. If left empty, the extraction will continue to the end of the input string. This parameter is useful for defining the end boundary of the text segment you wish to extract.
The output is the extracted substring based on the provided start and end markers. If no markers are provided, the entire input string is returned. This output is a single string that represents the portion of the input string that meets the specified criteria. It is useful for further text processing or analysis tasks.
start_string
and end_string
to define the exact boundaries of the desired substring.start_string
empty and provide an end_string
.start_string
and leave end_string
empty.start_string
and end_string
markers are unique within the input string to avoid unexpected results.start_string
marker does not exist within the input_string
.start_string
is correctly specified and exists within the input_string
.end_string
marker does not exist within the input_string
.end_string
is correctly specified and exists within the input_string
.start_string
marker appears after the end_string
marker in the input_string
, resulting in an invalid extraction range.start_string
appears before the end_string
in the input_string
.input_string
is empty, so there is no text to extract.input_string
with content to extract the substring from.© Copyright 2024 RunComfy. All Rights Reserved.