I have this string, it looks like this
sometext has a space before new line and moretext has a tab at the end (and maybe a new line)
I need to remove white space only at end of each line but excluding new line char.
here is what I have
output = "184.108.40.206 sometext \r\n220.127.116.11 othertext\r\n18.104.22.168 moretext\t"; output = Regex.Replace(output, @"^\s+|\s+$", "", RegexOptions.Multiline); this.textBox1.Text = output;
This is almost there but it removes new line too, and leaves me with
22.214.171.124 sometext126.96.36.199 othertext188.8.131.52 moretext
I'm hoping there is a regex practitioner who might help me out.
Thank you for taking the time to read.
(edit) cannot post code or format text correctly for some reason.
My original string does not contain empty lines.