c# 字符串截取string a="1:170,10,170,80;2:170,110,170,80;3:370,10,170,80;4:150,200,200,400;"
Regex r = new Regex("\\d+:"); string s = "1:170,10,170,80;2:170,110,170,80;3:370,10,170,80;4:150,200,200,400;"; string output = r.Replace(s, ""); Console.WriteLine(output);
恩 谢啦
subString(2,a.length-1);
如果位数固定的话.
您再看看我的结果
@东方俊彦: 先split ;然后取每个数组除了第一项以外的 最后合并!
恩 谢谢
Regex r = new Regex(@".(?=\:):");
string s = "1:170,10,170,80;2:170,110,170,80;3:370,10,170,80;4:150,200,200,400;";
string s1 = r.Replace(s, string.Empty);
Console.Write(s1);
恩 谢l