ASP提取整页中的链接和链接词 其他过滤 怎么正则

ASP提取整页中的链接和链接词 其他过滤 如何正则?
<a href="a.htm"><img src="a.jpg"/></a>
<a href='b.htm'><img src="b.jpg"/></a>
<a href=c.htm><img src="c.jpg"/></a>
<a href="dddd.htm" target="_blank">dddd</a>
<a class="aaa" href='eeee.htm'>eeee</a>
<a href=ffff.htm id="bbb">ffff</a>
<a href=http://www.baidu.com id="ggg">ggg</a>

请问如果只要链接和 对应的标题 把图片给过滤掉(即有图片链接的过滤不要了) 链接到外部的也过滤掉  该怎么写呢?
链接可能是href="xxxx" href=xxxx href=‘xxxx’ 三种格式
结果只会输出这样子的


dddd.htm|dddd
eeee.htm|eeee
ffff.htm|ffff

至于a.htm b.htm c.htm www.baidu.com 这几个链接会被排除 


------解决思路----------------------
取出所有连接,判断下内容不包含html标签才输出

s="<a href=""a.htm""><img src=""a.jpg""/></a><a href='b.htm'><img src=""b.jpg""/></a><a href=c.htm><img src=""c.jpg""/></a><a href=""dddd.htm"" target=""_blank"">dddd</a><a class=""aaa"" href='eeee.htm'>eeee</a><a href=ffff.htm id=""bbb"">ffff</a><a href=http://www.baidu.com id=""ggg"">ggg</a>"
set rx=new RegExp
rx.Global=true
rx.IgnoreCase=true
rx.Pattern="<a[^>]+?href=['""]?([^'"" >]+)[^>]*>([\s\S]+?)</a>"
set mc=rx.Execute(s)
for each m in mc
  if instr(m.submatches(1),"<")=0 then
    response.Write m.submatches(0)&" 
------解决思路----------------------
 "&m.submatches(1)&"<Br>"
  end if
next
set rx=nothing