A line break most likely consists of two combinations of CR + LF characters:
.replace(",\r\n\r\nfrom","\r\n\r\nfrom")
If you want to split the string for the current system, you can use the Environment.NewLine constant:
.replace(","+Environment.NewLine+Environment.NewLine+"from",Environment.NewLine+Environment.NewLine+"from")
Note that the @ in front of the line means that it does not use backslash escape sequences, but on the other hand, it may contain line breaks, so you can write it in this somewhat confusing way:
str = str.replace(@", from", @" from");
Guffa source share