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);
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5