Hi Saeed, Could you clarify exactly what you mean by "textbox at top of my document" ? I note the variable 'y you define in your code is never used. It appears to me your code deletes the tags "<NE>" and "</NE>," as well as white-space between them: is that correct ? yours, Bill
string test = "\r";
string afterTest = test.Trim();
// true
MessageBox.Show(string.IsNullOrEmpty(afterTest).ToString());
// true
MessageBox.Show(string.IsNullOrWhiteSpace(afterTest).ToString());
// true
MessageBox.Show((afterTest == string.Empty).ToString());
“Humans are amphibians: half spirit, half animal; as spirits they belong to the eternal world; as animals they inhabit time. While their spirit can be directed to an eternal object, their bodies, passions, and imagination are in continual change, for to be in time, means to change. Their nearest approach to constancy is undulation: repeated return to a level from which they repeatedly fall back, a series of troughs and peaks.” C.S. Lewis