<script type="text/vbscript">
<!--
dim str
str="您好,欢迎来到
脚本学堂"
set regex = new regexp
regex.pattern = "((.{1,3}?)2{2,})"
regex.global = true
regex.ignorecase = true
set matches = regex.execute(str) ' 执行搜索。
for each match in matches ' 循环遍历matches集合。
alert("重复的字符:" & match.submatches(1))
alert("整个重复的字符:" & match.submatches(0))
next
//-->
</script>