内容如:尺寸100*200
尺寸1200*300的架子, 尺寸1200*200的桌子
尺寸2400*1000
3200*1600
尺寸2400*1500,没有大尺寸*5
尺寸1100*400的架子, 尺寸1500*200的桌子,尺寸300*150的椅子
希望提取的结果:
100*200
1200*200 (说明:有多个型号,就取最后1个)
2400*1000
3200*1600
2400*1500
300*150
尺寸1200*300的架子, 尺寸1200*200的桌子
尺寸2400*1000
3200*1600
尺寸2400*1500,没有大尺寸*5
尺寸1100*400的架子, 尺寸1500*200的桌子,尺寸300*150的椅子
希望提取的结果:
100*200
1200*200 (说明:有多个型号,就取最后1个)
2400*1000
3200*1600
2400*1500
300*150
解决方案 »
- C# 读取并下载文件时(是用txt文件试的),把页面源文件内容也写到文件里了,请问这是怎么回事?
- datagridview自定义行的显示
- 急sql语句问题,请教大侠
- 如何更新dataset到数据库
- C#中类的定义
- DataAdapter.Fill指定条数记录,数据库返回全部记录还是返回所指定的记录条数?
- Winform 窗体中出现奇怪的问题!
- 关于ICloneable接口的问题
- oracle写1000行的存储过程很正常吗?
- 问一个直接用超连接打开一个EXE的问题。
- System.IO.IOException:由于线程退出或应用程序请求,已放弃I/O操作
- 聊天框怎么单机button后将textbox的数据存入数据库
{
string[] Detail = new string[] {
"尺寸100*200",
"尺寸1200*300的架子, 尺寸1200*200的桌子",
"尺寸2400*1000",
"3200*1600",
"尺寸2400*1500,没有大尺寸*5",
"尺寸1100*400的架子, 尺寸1500*200的桌子,尺寸300*150的椅子"
};
for (int i = 0; i < Detail.Length; i++)
{
string aDetail = Detail[i];
string[] sDetail = aDetail.Replace(" ", "").Split(',');
for (int j = 0; j < sDetail.Length; j++)
{
string asDetail = sDetail[j];
string tempDetail = "";
for (int k = 0; k < asDetail.Length; k++)
{
if (asDetail[k] >= '0' && asDetail[k] <= '9' || asDetail[k] == '*')
tempDetail += asDetail[k];
}
sDetail[j] = tempDetail;
} for (int j = sDetail.Length - 1; j >= 0; j--)
{
string asDetail = sDetail[j];
if (asDetail[0] != '*')
{
textBox6.Text += asDetail + "\r\n";
break;
}
}
}
}