Visit ComfyUI Online for ready-to-use ComfyUI environment
Clean and reformat text by splitting and rejoining segments with specified tokens for efficient text processing.
The JNodes_SplitAndJoin node is designed to help you clean and reformat text by splitting it at a specified token and then rejoining the valid segments using another token. This node is particularly useful for removing unwanted characters such as multiple commas, spaces, or newlines, thereby ensuring that your text is well-structured and free from unnecessary clutter. By leveraging this node, you can streamline your text processing tasks, making it easier to manage and manipulate large blocks of text efficiently.
This parameter takes the input text that you want to process. It supports multiline text, allowing you to input large blocks of text that may contain multiple lines or paragraphs. The text will be split based on the split_at
token and then rejoined using the join_with
token. There are no specific minimum or maximum values for this parameter, but it should be a valid string.
This parameter specifies the token at which the input text will be split. It supports single-line text, meaning you can input any character or string that you want to use as the delimiter for splitting the text. For example, you can use a comma, space, or newline character. The choice of token will significantly impact how the text is divided into segments. There are no specific minimum or maximum values for this parameter, but it should be a valid string.
This parameter defines the token that will be used to rejoin the valid segments of the text after it has been split. Like split_at
, it supports single-line text, allowing you to specify any character or string that you want to use as the joining token. For example, you can use a space, comma, or any other character. The choice of token will determine how the final text is formatted after rejoining. There are no specific minimum or maximum values for this parameter, but it should be a valid string.
The output of this node is a single string that contains the rejoined text. After splitting the input text at the specified split_at
token and removing any empty segments, the remaining valid segments are rejoined using the join_with
token. The resulting string is clean and well-formatted, free from any unwanted characters or empty segments. This output can be used for further text processing or as a final cleaned text for your application.
split_at
parameter to target specific characters or strings that you want to remove or separate in your text, such as commas, spaces, or newlines.join_with
token to ensure that the rejoined text is formatted correctly and meets your requirements, such as using a space to separate words or a comma to create a list.split_at
or join_with
is Nonesplit_at
or join_with
parameter is not provided or is set to None.split_at
and join_with
parameters are specified and contain valid string values.split_at
or join_with
token is not a valid string.split_at
and join_with
parameters are valid strings and not empty or None.© Copyright 2024 RunComfy. All Rights Reserved.