Dim oRe, oMatch, oMatches,inpstr
str =str & "<!--data-dynamicbind={'cType':1,'menuId':228,'count':9,'length':30,'dateStyle':'mm.dd'}--><li><span><!--data-dynamicbindEnd-->"
str =str & "<!--data-dynamicbind={'cType':1,'menuId':228,'count':9,'length':30,'dateStyle':'mm.dd'}--><li><span><!--data-dynamicbindEnd-->"
str =str & "<!--data-dynamicbind={'cType':1,'menuId':228,'count':9,'length':30,'dateStyle':'mm.dd'}--><li><span><!--data-dynamicbindEnd-->"
str =str & "<!--data-dynamicbind={'cType':1,'menuId':228,'count':9,'length':30,'dateStyle':'mm.dd'}--><li><span><!--data-dynamicbindEnd-->"
Set oRe = New RegExp
oRe.Pattern = "<!--data-dynamicbind[\s|\S]*-->[\s|\S]*<!--data-dynamicbindEnd-->"
oRe.Global = True
oRe.IgnoreCase = True
oRe.MultiLine = True
Set oMatches = oRe.Execute(str)
response.Write(oMatches.Count)
这样写只能匹配一个,我想能匹配str4个。内容
<!--data-dynamicbind.*?-->.*?<!--data-dynamicbindEnd-->
MatchCollection