日期:2014-05-18  浏览次数:21328 次

Replace 怎么把逗号替换成 两个空格 Replace(",", " ");
Replace(",", " ");

------解决方案--------------------
string s = "Hello,World!";
Response.Write(s.Replace(",", "  "));
------解决方案--------------------
探讨
C# code

string str = "你要替换的字符串";
Regex re = new Regex(@"[,,]+", RegexOptions.None);
str = re.Replace(str," ");

------解决方案--------------------
探讨
引用:
C# code

string str = "你要替换的字符串";
Regex re = new Regex(@"[,,]+", RegexOptions.None);
str = re.Replace(str," ");


Regex re = new Regex(@"[,,]+", RegexOptions.None);

------------……