I want to remove all empty newline in the string.
Attached is my text that I want to remove the new line.
I’ve tried few method but all failed and does not change at all. I’m not sure why.
Try method 1
Try method 2
System.Text.RegularExpressions.Regex.Replace(processDetail, “\n+”, “”)
EXAMPLE.txt (574 Bytes)
Hello, have you tried with vbNewLine instead of Environment.NewLine ?
As following : processDetail.Replace(vbNewLine+vbNewLine,vbNewLine)
Can you try the following expression?
I’ve tried with vbNewLine also not working.
It became like this .
There are few lines that combined together instead.
Sorry, I had a mistake. Can you try the following?
This one work!
Can I know is vbCrLf stands for new line ?
Yes, vbCrLf is Chr(13)+Chr(10) : this is linebreak of WindowsOS.
Thank you for the resource and your help on this.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.