Torna al Thread
string startText = "\n\t\\select id \n from ec..... singleQuot;\n S singleQuot;..... \n\\s end"; // \s --> ???
string[] parts = startText .Split(new string[] {"singleQuot"}, StringSplitOptions.RemoveEmptyEntries );
// edit only parts "outer" of the separator, this is obtained with step of 2
for(int x=0; x<parts.Length; x+=2)
{
// remove chars: forse questa parte può essere fatta usando una regular expression
parts[x] = parts[x].Replace("\n", "").Replace("\t", "");
}
string finalText= string.Join("singleQuot", parts);