How to remove CRLF from string

Hi, I have scraped data from a web site and written it to csv. Unfortunately there is a line break that I should remove and I have tried almost everything that comes to my mind. Please help me with how to remove the line break. I’m trying to use replace activity. and tried \n\r \s but the line break wont go away.

I have also tried to assign mySTRvariable = mySTRvariable.replace(Environment.newline," ")

Notepad++ shows that there is that CRLF.


Try this:

    yourString.Replace(vbCr, "").Replace(vbLf, "")


Check with this as well

MyString.Replace(Environment.NewLine, String.Empty)

we got two options
str_output= System.Text.RegularExpressions.Regex.Replace(yourinputString, “\t|\n|\r”, “”)

Or you can try

str_outpu= yourinputString.Replace(Environment.newLine,"")

Cheers @hemuli


I don’t understand why these are not working. Please can someone check my xaml. The issue which I’m trying to solve is inside “accepted trades”. and in write csv there is one line where this issue (19.4 KB)


I suppose you should set “\r\n” instead of “\n\r+” in pattern property of your Replace Activity.


Hi, yes, I have tried also that without results

Hi, sorry this is my bad. When trying to achieve this I completely messed my variables and it is actually working. :zipper_mouth_face::face_with_thermometer:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.