<UL>
<LI><SPAN class=list-category>[文坛张望]</SPAN> <A class=list-title href="/blog/archives/119491210.shtml"><STRONG>谁会拿下2010年的诺贝尔文学奖?</STRONG></A> <SPAN class=list-date>(2010-10-01 22:38)</SPAN></LI> 
<LI><SPAN class=list-category>[视觉训练]</SPAN> <A class=list-title href="/blog/archives/119247165.shtml"><STRONG>书法练习二幅</STRONG></A> <SPAN class=list-date>(2010-09-29 01:51)</SPAN> </LI>
<LI><SPAN class=list-category>[文坛张望]</SPAN> <A class=list-title href="/blog/archives/118604217.shtml"><STRONG>骆以军对话董启章</STRONG></A> <SPAN class=list-date>(2010-09-21 17:15)</SPAN> </LI>
<LI><SPAN class=list-category>[视觉训练]</SPAN> <A class=list-title href="/blog/archives/118206492.shtml"><STRONG>夜临古画(六) </STRONG></A><SPAN class=list-date>(2010-09-17 01:46)</SPAN> </LI>
<LI><SPAN class=list-category>[我也读书]</SPAN> <A class=list-title href="/blog/archives/117345094.shtml"><STRONG>Jennifer Egan 的《A Visit From the Goon Squad》</STRONG></A> <SPAN class=list-date>(2010-09-07 02:30)</SPAN> </LI>
<LI><SPAN class=list-category>[我也读书]</SPAN> <A class=list-title href="/blog/archives/116446375.shtml"><STRONG>当我们谈论电子书的时候我们在谈论电子书阅读器</STRONG></A> <SPAN class=list-date>(2010-08-27 16:51)</SPAN> </LI>
<LI><SPAN class=list-category>[IT互联网]</SPAN> <A class=list-title href="/blog/archives/116133972.shtml"><STRONG>“读写人”和“比目鱼”网站的手机版</STRONG></A> <SPAN class=list-date>(2010-08-24 02:04)</SPAN> </LI>
</UL>
怎么取出<STRONG>到</STRONG>之间的部分

解决方案 »

  1.   

    '此代码由“正则测试工具 v1.1.33”自动生成,请直接调用TestReg过程
    Private Sub TestReg()
        Dim strData As String
        Dim reg As Object
        Dim matchs As Object, match As Object    strData = "<UL> <LI><SPAN class=list-category>[文坛张望]</SPAN> <A class=list-title href=""/blog/archives/119491210.shtml""><STRONG>谁会拿下2010年的诺贝尔文学奖?</STRONG></A> <SPAN class=list-date>(2010-10-01 22:38)</SPAN></LI> <LI><SPAN class=list-category>[视觉训练]</SPAN> <A class=list-title href=""/blog/archives/119247165.shtml""><STRONG>书法练习二幅</STRONG></A> <SPAN class=list-date>(2010-09-29 01:51)</SPAN> </LI> <LI><SPAN class=list-category>[文坛张望]</SPAN> <A class=list-title href=""/blog/archives/118604217.shtml""><STRONG>骆以军对话董启章</STRONG></A> <SPAN class=list-date>(2010-09-21 17:15)</SPAN> </LI> <LI><SPAN class=list-category>[视觉训练]</SPAN> <A class=list-title href=""/blog/archives/118206492.shtml""><STRONG>夜临古画(六) </STRONG></A><SPAN class=list-date>(2010-09-17 01:46)</SPAN> </LI> <LI><SPAN class=list-category>[我也读书]</SPAN> <A class=list-title href=""/blog/archives/117345094.shtml""><STRONG>Jennifer Egan 的《A Visit From the Goon Squad》</STRONG></A> <SPAN class=list-date>(2010-09-07 02:30)</SPAN> </LI> <LI><SPAN class=list-category>[我也读书]</SPAN> <A class=list-title href=""/blog/archives/116446375.shtml""><STRONG>当我们谈论电子书的时候我们在谈论电子书阅读器</STRONG></A> <SPAN class=list-date>(2010-08-27 16:51)</SPAN> </LI> <LI><SPAN class=list-category>[IT互联网]</SPAN> <A class=list-title href=""/blog/archives/116133972.shtml""><STRONG>“读写人”和“比目鱼”网站的手机版</STRONG></A> <SPAN class=list-date>(2010-08-24 02:04)</SPAN> </LI> </UL>"    Set reg = CreateObject("vbscript.regExp")
        reg.Global = True
        reg.IgnoreCase = True
        reg.MultiLine = True
        reg.Pattern = "<STRONG>(.+?)</STRONG>"
        Set matchs = reg.Execute(strData)
        For Each match In matchs
            'Debug.Print match.Value
            Debug.Print match.SubMatches(0)
        Next
    End Sub