回复 Demon
我的测试程序是这样的:
改成您说的代码后,运行结果并不能取得预期字符。。。
...
小爪冰凉君 发表于 2011-11-22 22:10 - a = "<td class=""third""><span><a href=""http://mp3.baidu.com/singerlist/%D6%DC%BD%DC%C2%D7.html"" target=""_blank"">周杰伦</a></span></td>"
- Set choose = New RegExp
- choose.Global = true
- 'choose.Pattern = "(?=<td class=""third""\S*target=""_blank"">).*(?=</a></span></td>)"
- 'choose.Pattern = "[\u4E00-\u9FFF]*"
- 'choose.Pattern ="(?=class=""third"">\S*\s\S\s.{18})\S{1,10}(?=</a></span></td>)"
- choose.Pattern = "<td class=""third""><span><a .+?>(.+?)</a>"
- For Each colm In choose.Execute(a)
- MsgBox colm.Submatches(0)
- next
复制代码 好好补充一下正则表达式的知识吧。 |