Transformer to delete line breaks in a string

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Transformer to delete line breaks in a string

Hello,

Some data is introduced in XSOAR with line breaks. Example:

 

data1,

data2,

data3,

data4

 

This data is joined with "," to be introduced in a task. However, data is not parsed correctly and the line breaks are introduced, causing an incorrect output.

 

How can this line breaks be removed?

2 REPLIES 2

L2 Linker

Hey @BCC_Automatizacion_Josep,

 

To remove line breaks you can use the "Replace match" transformer, which is used for replacing text that matches a given regex.

The regex would be \n and the replaceWith argument will be left empty, to simply remove the line break:

nkazinets_0-1671057061912.png

 

It's working!! Thanks!!

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!