c#替换字符的多个空格多个换行及中文字符

来源:互联网 发布:结构设计用什么软件 编辑:程序博客网 时间:2024/05/19 16:07
            xml = xml.Replace(" ", " ");
            xml = xml.Replace("\t", "");
            xml = Regex.Replace(xml, "[\r]{2,}", "\n");
            xml = xml.Replace("\n ", "\n");
            xml = xml.Replace(" \n", "\n");
            xml = Regex.Replace(xml, "[\n]{2,}", "\n");
            xml = Regex.Replace(xml, "[ ]{2,}", " ");
0 0
原创粉丝点击