<li class="info_t">
                <h3>

                 <a href="/map/21/point-17408-%B6%AB%CD%E5-.htm" target='_blank'">东湾小区</a><span id='chain1' class='branch'></span><span id="p_topicitem_17408"></span>



                </h3>
                    <p>地址: 龙吴路2388弄</p>
                


<p style=height:12px;></p>
<p class="shopYX">商户印象:
<a href='/map/21----%D7%A1%D5%AC%D0%A1%C7%F8----/'>住宅小区</a>
</p>
</li>
这个li  下面的 东湾小区

解决方案 »

  1.   

    干嘛要用正则表达式啊。直接用indexof不久得了。
      

  2.   

    Regex re = new Regex("">(.*?)</a>",RegexOptions.MultiLine);MatchCollectionre.Matches mc = new MatchCollectionre.Matches("Text");
    foreach (Match mc0 in mc){
        MessageBox.Show(mc0.Value);
        foreach (Match mc1 in mc父.Groups)
        {
            MessageBox.Show(mc1.Value);
        }
    {
      

  3.   

    Regex reg = new Regex(@"(?is)<li class=""info_t"">\s*<h3>\s*<a[^>]*>(?<li>.*?)</a>");
    foreach (Match mc in reg.Matches(input))
       Cosole.WriteLine(mc.Groups["li"].Value);
      

  4.   


       getstring = getstring.Replace("\n", String.Empty).Replace("\r", String.Empty).Replace("\"", "'");
            Match match = Regex.Match(getstring, @"(?is)<li class=""info_t"">\s*<h3>\s*<a[^>]*>(?<li>.*?)</a>", RegexOptions.IgnoreCase);        if (match.Success)
            {
                string s = match.Groups["li"].Value;
            }到match.Success时为假