PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

Replace EOL

Turns the text sequences \n, \r and \t into real line breaks and tabs, or real line breaks and tabs back into \n, \r and \t.

Replace EOL converts line breaks and tabs in both directions:

  • the two-character text sequences \n, \r and \t (a backslash followed by a letter) become a real new line, carriage return and tab, or
  • real new lines, carriage returns and tabs become the text sequences \n, \r and \t.

Use the first direction when a value arrives with escaped line breaks (for example from a JSON string or an API) and you want real lines in an email or a document. Use the second to put a multi-line text on one line, for example before you send it inside a JSON body or write it to a CSV cell.

Add the action

In the Process Designer toolbox, open String and pick Replace EOL (or type Replace EOL in the search box).

The Replace EOL action properties: String to process, Option and Processed string

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
String to processInputTextYesThe text to convert.
OptionInputList of choicesYes\n, \r, \t to ASCII (the default): text sequences become real characters. ASCII to \n, \r, \t: real characters become text sequences.
Processed stringOutputTextYesThe converted text.

Example

String to processOptionProcessed string
Line one\nLine two\tTabbed (typed with backslashes)\n, \r, \t to ASCIILine one + new line + Line two + tab + Tabbed
Line one + new line + Line two + tab + TabbedASCII to \n, \r, \tLine one\nLine two\tTabbed
A + Windows line break (carriage return + new line) + BASCII to \n, \r, \tA\r\nB
A\r\nB (typed with backslashes)\n, \r, \t to ASCIIA + carriage return + new line + B

Good to know

  • Only \n, \r and \t are converted. Other escape sequences, such as \" or รฉ, are left as they are.
  • A Windows line break is two characters (carriage return + new line), so it becomes \r\n, not \n.
  • If String to process is empty, Processed string is empty.

On this page