***** 
<ul class="pdlist_unitprice">
    <li><b>1元=12.00</b>两</li>
    <li>0.0833元/两</li>
 </ul>
*****
星号表示其他代码,求抓出 0.0833元/两 ,先谢谢帮忙的同道们。

解决方案 »

  1.   

    会有重复,最好用 Regex.Matches(); 来匹配,关键是这个 0.0833 这个数据,元/两 无所谓的
      

  2.   


                StreamReader reader = new StreamReader("c:\\temp\\1.txt",Encoding.Default);
                string source = reader.ReadToEnd();
                Regex reg = new Regex(@"(?is)(?<=<li>)[^<>]*?(?=</li>)");
                Match mm = reg.Match(source);
                MessageBox.Show(mm.Value);
      

  3.   

    (?is)<ul class="pdlist_unitprice">.*?<li>([^<>]+>?)</li>.*?</ul>取Groups[1].Value
      

  4.   

    (?is)<ul class="pdlist_unitprice">.*?<li>(\d+(\.\d+)?元/两?)</li>.*?</ul>