I'm reading in a string from a database, but there are non-printing characters that are being read in that cause problems elsewhere.

I thought it was just a newline, but the following didn't work:

string theString = "junk read in from database";
theString.Replace("\n", "");

//This didn't work either:
theString.Replace(Environment.NewLine, "");

Since those don't work, I can only assume that there are other types of characters in the string. Is there a simple way to fix the string, or do I just need to write a loop going through the string one character at a time? What about regexp?

cudabean