最近接触搜索引擎技术,刚起步中遇到不少问题,目前有一个问题GOOGLE和百度了没找到答案!
 try
            {
                Regex reg = new Regex(txtregex.Text);//txtregex中输入的是href的正则表达式
                if (reg.IsMatch(richTextBox1.Text))
                {
                    foreach (Match match in reg.Matches(richTextBox1.Text))
                    {
                        listBox1.Items.Add(match.Groups[txttag.Text].Value);//将提取的内容放在listbox中
                    }
                }
                else
                {
                    MessageBox.Show("没有找到你要的数据");
                }            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
我有几个问题不懂:
一.Regex reg = new Regex(txtregex.Text);中的regex类是什么,作用是什么?
二.Match是什么reg.Matchs属性是什么意思呢?
请大家帮忙回答,谢谢!