</span></span></span></span></span></span></p><p><img src="http://img04.taobaocdn.com/imgextra/i4/37466590/T2CFGVXgNbXXXXXXXX_!!37466590.jpg" align="absMiddle"><img src="http://img04.taobaocdn.com/imgextra/i4/37466590/T25Vm8XnBXXXXXXXXX_!!37466590.jpg" align="absMiddle"><img src="http://img01.taobaocdn.com/imgextra/i1/37466590/T2P_GsXidcXXXXXXXX_!!37466590.jpg" align="absMiddle"></p><p><img src="http://img02.taobaocdn.com/imgextra/i2/37466590/T2xCXdXotNXXXXXXXX_!!37466590.jpg" align="absMiddle"></p><p><img src="http://img01.taobaocdn.com/imgextra/i1/37466590/T2u2DwXcxXXXXXXXXX_!!37466590.jpg" align="absMiddle"><img src="http://img03.taobaocdn.com/imgextra/i3/37466590/T2hLnwXfpXXXXXXXXX_!!37466590.jpg" align="absMiddle"></p>
怎么用asp.net C#把以上的文本取出图片地址存放到数组当中
Regex r = new Regex("http://img" + "[0-9]{2}" + ".taobaocdn.com" + "[a-zA-Z0-9/_!]{51}" + ".jpg");
MatchCollection mc = r.Matches(sb);
int count = mc.Count;
String[] results = new String[count];
int[] matchPosition = new int[count];
for (int i = 0; i < count; i++)
{
results[i] = mc[i].Value;
matchPosition[i] = mc[i].Index;
Response.Write("第"+i+"个匹配结果:"+results[i]+",位置:"+matchPosition[i]+"</br>");
}
能够想到的就是http开头 .jpg结尾
具体怎么做呢
正则表达式 请参考http://deerchao.net/tutorials/regex/regex.htm