不管多少个空格替换为一个空格

// 正则表达式 不管多少个空格替换为一个空格
string new_str = Regex.Replace(m_TextAsset.text.Trim(), "\\s+", " ");

posted @ 2014-09-28 10:33  ing...  阅读(193)  评论(0编辑  收藏  举报