想要的结果是 取得 “文章主题” 这四个字!  请高手帮忙啊,要不就过不了国庆了啊,惨!我自己写的正则(居然不行 晕~):<td([^>])*\sclass=["]centertitle["]>(^\/td)[^>]([^>])*(\w|\W)*</td>下面是要取的HTML:  <td width="2"></td>
    <td valign="top" id="centerinfo">
  <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="functiontable">
   <tr>
   <td  class="centertitle">主题:<font color=#BC8F8F>文章主题</font>
<script>
        titleinfos();
</script> </td>
    <td class="functionright"><table  border="0" align="right" cellpadding="0" cellspacing="0" class="logintable">
          <tr>
            <td class="loginbot" nowrap><a href="javascript:DoLogin('/cgi-bin/bbs/bbs_login?g=m&p=self&url=reload');"><script>document.write("<img src=\"/images/",style,"/bots.gif\" width=\"60\" height=\"18\" border=\"0\" alt=\"??\" title=\"??\">");</script></a></td>
            <td class="loginpost" nowrap><a href="javascript:do_reply('o',sOrgMsgID);"><script>document.write("<img src=\"/images/",style,"/bots.gif\" width=\"60\" height=\"18\" border=\"0\" alt=\"??\" title=\"??\">");</script></a></td>
          </tr>
        </table></td>
   </tr>
  </table>
    </td>
  </tr>
  <tr>
    <td rowspan="2" align="center" valign="top" class="writeinfo"><table  border="0" cellpadding="0" cellspacing="0">
      <tr>

解决方案 »

  1.   

    (?=<font color=#BC8F8F>).*?(?<=</font>)
      

  2.   

    正解1:<font color=#BC8F8F>(.+?)</font>也可以通过捕捉组捕捉:<font color=#BC8F8F>(?<title>.+?)</font>
    这样更方便些但要注意:使用时必须保证圆括弧前后的标签必须有一个是唯一的,如果在源码中不唯一,可以前后延展标签的位置
      

  3.   

    <td  class=\"centertitle\">主题:<font color=\#BC8F8F>(.+?)</font>
    也可以