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 = "126.96.36.199 sometext \r\n188.8.131.52 othertext\r\n184.108.40.206 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
220.127.116.11 sometext18.104.22.168 othertext22.214.171.124 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.