如下代码如何获得以下内容
使用正则表达式得到<documents>......</documents>中的内容(即得到<documents>以及<documents>之中的内容)
<div class="exp">
<h2><strong>啊啊</strong><a href="#" class="more">更多</a></h2>
<ul>
<documents num="5" ChildID="fswd_low" Length="20" Order="desc_newsid">
  <Record><li><a href="<document filed='NewsUrl'>"><document field='Title'></a><span><document   field='pTime'    Model="Short_time"></span></li></Record>
</documnets>
</ul>
<div class="high">
<h2><strong>办不办</strong><a href="#" class="more">更多</a></h2>
<ul>
<documents num="5" ChildID="fswd_high" Length="21" Order="desc_newsid">
   <Record><li><a href="<document field='NewUrl'/>"><document field='Title' /></a><span><document field='pTime' Model="Short_time"></span></li></Record>
</documents>
</ul>

解决方案 »

  1.   

     string sHTML = @"div class=""exp""> 
    <h2> <strong>啊啊 </strong> <a href=""#"" class=""more"">更多 </a> </h2> 
    <ul> 
    <documents num=""5"" ChildID=""fswd_low"" Length=""20"" Order=""desc_newsid""> 
      <Record> <li> <a href="" <document filed='NewsUrl'>""> <document field='Title'> </a> <span> <document  field='pTime'    Model=""Short_time""> </span> </li> </Record> 
    </documents> 
    </ul> 
    <div class=""high""> 
    <h2> <strong>办不办 </strong> <a href=""#"" class=""more"">更多 </a> </h2> 
    <ul> 
    <documents num=""5"" ChildID=""fswd_high"" Length=""21"" Order=""desc_newsid""> 
      <Record> <li> <a href="" <document field='NewUrl'/>""> <document field='Title' /> </a> <span> <document field='pTime' Model=""Short_time""> </span> </li> </Record> 
    </documents> 
    </ul> 
    ";
              Regex reg = new Regex(@"<documents[^>]*?>([\S\s]*?)</documents>", RegexOptions.IgnoreCase);
              MatchCollection mc = reg.Matches(sHTML);
              foreach (Match m in mc)
              {
                  Response.Write(Server.HtmlEncode(m.Result("$1")) + "<BR>");
              }
      

  2.   


    @"(?is)<documents[^>]*?>.*?</documents>"
      

  3.   

    <documents[^>]*?>([\S\s]*?)</documents>这个正则表达式只能够显示一个<documents>以及<documents>中的内容啊,我如果想显示多个怎么办?