Split String by New Line
- 28 Feb 2025
- 1 Minute to read
- Print
- DarkLight
Split String by New Line
- Updated on 28 Feb 2025
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Step Details | |
Introduced in Version | 4.0.0 |
Last Modified in Version | 7.12.0 |
Location | Data > 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:
- When the text is entered through a text area in Forms.
- When using the merge text editor input type on the Create Data step.
Properties
Inputs
Property | Description | Data Type |
---|---|---|
Source | Multi-line string to be split. | String |
Outputs
Property | Description | Data Type |
---|---|---|
SplitStringByNewLine1_Output | A list made up of each line of the input string. | List of String |
Examples
- 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.
- 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?