会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
sirzxj
随笔
博客园
首页
新随笔
联系
订阅
管理
2010年12月9日
多余空格,转换空格
摘要: string s = " 这个 可以 把 撒的发看 开 头 中间 多余 的空格去掉"; string pattern = " +";//注意格式 string result = Regex.Replace(s.Trim(), pattern, " "); result = result.Replace(" "," ");//替换 空格 Console.WriteLine(result);
阅读全文
posted @ 2010-12-09 23:50 sirzxj
阅读(134)
评论(0)
推荐(0)
编辑
公告