日期:2014-05-17 浏览次数:20746 次
????private?void?taobao_old_key(List<string>?tmp)
????????{
????????????foreach?(string?keyword?in?tmp)
????????????{
????????????????//此处代码较长,以dosomthing代替,主要是获取源码的过程,没有使用到任何控件
????????????????dosomthing;
????????????????//下面的是使用正则表达式匹配源码,找到数据,添加到listbox控件当中
????????????????Regex?taobaoold_regex?=?new?Regex(@"\[""(?<taobaoold>.*?)"".*?""");
????????????????MatchCollection?taobaoold_match?=?taobaoold_regex.Matches(mystringbuilder.ToString());
????????????????List<string>?matches?=?new?List<string>();
????????????????for?(int?i?=?0;?i?<?10?&&?i?<?taobaoold_match.Count;?i++)
????????????????{
???????????????????matches.Add(taobaoold_match[i].Groups[1].Value);
????????????????}
????????????????AddToListBox(DroplistBox,?matches);
????????????}
MessageBox.Show("查询完毕!");
????????}
private void Startbutton_Click(object sender, EventArgs e)
{
List<string> listString;
//对liststring赋值操作不写了,直接略过,然后将liststring的值传递到函数中去,就是挖掘liststring中关键词的数据
Start = new Thread(() =>
{
taobao_old_key(listString);
MessageBox.Show("查询完毕!");
});
Start.IsBackground = true;
&nb