cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Remove CRLF from the text file

groverarena
New Contributor

Hi,
What should I add to this to remove CR and LF while generating a text file using File Writer .

โ€œTest/Hello_โ€+ Date.now().toLocaleDateString(โ€˜{โ€œformatโ€:โ€œMMMโ€}โ€™).toUpperCase()+Date.now().toLocaleDateString(โ€˜{โ€œformatโ€:โ€œYYYYโ€}โ€™)+โ€œ.txtโ€

9 REPLIES 9

Supratim
Contributor III

@groverarena Not sure how did you get CR and LF here. You can use โ€˜Test/Hello_โ€™+Date.now().toLocaleDateTimeString({format: โ€œMMMYYYYโ€}).toUpperCase()+โ€˜.txtโ€™ to minimize your query.

@Supratim, I didnโ€™t understand your response. I am talking about removing Carriage Return and Line Feeds from the text file. The above query is working fine

Ok. Then try this-
$content.replaceAll(โ€˜\r\nโ€™, โ€˜โ€™)

Where do I add this in my pipeline?
image