Split String by New Line
  • 28 Feb 2025
  • 1 Minute to read
  • Dark
    Light

Split String by New Line

  • Dark
    Light

Article summary

Step Details

Introduced in Version4.0.0
Last Modified in Version7.12.0
LocationData > Text

The Split String by New Line step divides the source string at every new line, producing a list of strings as output. This step takes the new line character as the delimiter to split the string. It is essential to note that this functionality requires multi-line text input. The string will only be split if multiple lines are present, which can happen in two scenarios:

  1. When the text is entered through a text area in Forms.
  2. When using the merge text editor input type on the Create Data step.

Properties

Inputs

PropertyDescriptionData Type
SourceMulti-line string to be split.String

Outputs

PropertyDescriptionData Type
SplitStringByNewLine1_OutputA list made up of each line of the input string.List of String

Examples

  1. Input through a Text Area in Forms: When entering text in a text area in a Form, press Enter to create a new line and then select Done. This action sends the text as a single string with newline characters to the Split String by  New Line step. As a result, the Split String by New Line step will divide this input string from the Form's text area into three distinct strings, as shown in this example.
  2. Merge Text Editor Input: When text is entered in the Merge text editor, it is sent as one continuous string to the Split String by New Line step. If the text contains newline characters, this step will divide the single string into separate strings, as shown in this example.
Note
In addition to Merge Text, another input type is Merge HTML. The HTML `<br>` tag represents a new line in this case. However, it's important to note that the Split String by New Line step does not recognize the `<br>` tag as a delimiter for splitting strings.

Was this article helpful?