<script language="VBScript">
Dim str
str = "TeST aaa(12) TeST bbb(34) TeST ccc(56) TeST"
Set re = new RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = "(\w+)\((\d+)\)"
Set Matches = re.Execute(str)
For Each Match in Matches
document.writeln(Match & "<br>")
Next
Set re = nothing
</script>
如上情况,$1为 \w+,$2为 \d+,结果为
aaa(12)
bbb(34)
ccc(56)
<script language="VBScript">
Dim str
str = "TeST aaa(12) TeST bbb(34) TeST ccc(56) TeST"
Set re = new RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = "(\w+)\((\d+)\)"
str = re.Replace(str, "$1###$2")
re.Pattern = "(\w+)###(\d+)"
Set Matches = re.Execute(str)
For Each Match in Matches
SP = Split(Match, "###")
document.write(" 这是$1:" & SP(0) & "<br>")
document.write(" 这是$2:" & SP(1) & "<br>")
document.write("<hr size=1>")
Next
Set re = nothing
</script>
最后自己还是下载盗链的网站的CSS,版面全部一致
posted on 2007-07-02 08:45
dragon 阅读(44)
评论(0) 编辑 收藏 所属分类:
asp学习日记