28,390
社区成员
发帖
与我相关
我的任务
分享
patrn="<tr[^>]*>[^<]*<td[^>]*>([^<]*)<\/td>[^<]*<td[^>]*>([^<]*)<\/td>[^<]*<td[^>]*>([^>]*)<\/td>[^<]*<td[^>]*>([^>]*)<\/td>[^<]*</tr>"
str="<table width=""200"" border=""0""><tr><td>张三 </td><td>1112 </td><td>SD001 </td><td>123456 </td></tr></table>"
Set regEx = New RegExp ' 创建正则表达式。
regEx.Pattern = patrn ' 设置模式。
regEx.IgnoreCase = True ' 设置是否区分大小写。
regEx.Global = True ' 设置全程匹配。
Set Matches = regEx.Execute(str) ' 执行搜索。
alert(Matches.count)
For Each Match in Matches ' 循环遍历Matches集合。
' 张三出来了 Match.SubMatches(0)
Next