<input name="url" id="url" type="text" class="input" readonly="readonly" value="(.*?)" />
  
*****************************************************************************
http://feiyun0112.cnblogs.com/

解决方案 »

  1.   


    这个怎么用呢?private string regalurValidateAndReturnFoundResult0(string strToCheck)
            {
                string pattern =@"<input name="url" id="url" type="text" class="input" readonly="readonly" value="(.*?)" />";              
                System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex(pattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase);            
                System.Text.RegularExpressions.Match m = r.Match(strToCheck);  
                StringBuilder strFoundResult = new StringBuilder();

    if (m.Success)
               {
                     strFoundResult.Append(m);
                     return txtFoundResult.Text=strFoundResult.ToString();
               }
       else
       {
         return txtFoundResult.Text = "";
               }
            }返回的是:
    <input name="url" id="url" type="text" class="input" readonly="readonly" value="http://t.cn/zRG1OnA" />我要的只是里面的value的值哦。
      

  2.   

    strFoundResult.Append(m。Group【1】。Value);
      

  3.   

    MatchCollection mCollection = Regex.Matches(html, "<input name=\"url\" id=\"url\" type=\"text\" class=\"input\" readonly=\"readonly\" value=\"(.*?)\" />
    ");
    string val = string.Empty;
    if(mCollection!=null && mCollection.Count>0)
    {
        val = mCollection[0].Value;
    }