dim container
container="{$1,man,hits,hits$} 456545767 $2,title,man,game$ asfasdfa$3,game,hits,man$"
dim regex,objmatch,matches ' 建立变量。
Set regex = New RegExp ' 建立正则表达式。
regex.Global = True ' 设置全局可用性。
regex.IgnoreCase = True ' 设置是否区分字符大小写。
regex.Pattern = "\$[\S\s]+?\$" ' 设置模式
Set matches = regex.Execute(container) '匹配内容
For Each objmatch in matches ' 遍历匹配集合。
'response.Write objmatch.Value & "
" '显示数组
'response.write split(replace(objmatch.Value,"$",""),",")(0) & "
" '显示数组的第一个数
games=replace(replace(replace(replace(objmatch.Value,"title","标题"),"hits","阅读次数"),"game","内 容"),"man","作者")
'response.write games & "
"
response.write split(replace(games,"$",""),",")(0) & "__" & split(replace(games,"$",""),",")(1) & "__" & split(replace(games,"$",""),",")(2) & "__" & split(replace(games,"$",""),",")(3) & "
"
Next
response.end
%>