C#:替换字符串(文字),仅替换第1次出现的

string s = "aaa";
Regex r = new Regex("a");
s=r.Replace(s,"b",1);

猜你喜欢

转载自blog.csdn.net/jyh_jack/article/details/86505579