c#截取字符串求教

lxbgg 2016-10-14 12:27:40

GPT "jx19" 458441.93 2703010.38 8.51 24.429862207770 118.090210521573 13:07:41 09/12/2016 0.00 0.00 0 706 0.00 "" "QUA 0 47261.077 4 9.30 0.70 14.00 4.00 " 0.00

只获取jx19 458441.93 2703010.38 应该怎么修改呢?

string[] strs = readStr.Split(new char[] { '\t', '"' }, StringSplitOptions.RemoveEmptyEntries);


...全文
96 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
qbilbo 2016-10-14
  • 打赏
  • 举报
回复
string[] strs = readStr.Split(new char[] { '\t', '\"',' ' }, StringSplitOptions.RemoveEmptyEntries);
string[] strs2 = new string[3];
Array.Copy(strs, 1, strs2, 0, 3);
 foreach(string s in strs2)
 {
        Console.WriteLine(s);
 }
Console.ReadKey();

110,545

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧