string oldstr = "baidu.+?wd=|baidu.+?word";
Regex rgx = new Regex(@".*?\?(?
string getstr1 = rgx.Match(oldstr).Result("${temp1}").ToString();
string getstr2 = rgx.Match(oldstr).Result("${temp2}").ToString();
TextBox2.Text = getstr1 + "\n" + getstr2;
string oldstr = "baidu.+?wd=|baidu.+?word";
Regex rgx = new Regex(@".*?\?(?
string getstr1 = rgx.Match(oldstr).Result("${temp1}").ToString();
string getstr2 = rgx.Match(oldstr).Result("${temp2}").ToString();
TextBox2.Text = getstr1 + "\n" + getstr2;
希望对您有点帮助.
http://www.baidu.com/s?wd=a
http://www.baidu.com/s?wd=(.+)
Match.Group[1].Value;