(急)补充正则表达式匹配数字规则
宾远 2011-02-14 10:31:59 <%
Dim regEx
Set regEx = New RegExp
temp=""
str="13666020256"
'匹配6位顺增
regex.Pattern = "(?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){5}\d"
if regex.test(str) then temp="ABCDE"
'匹配6位顺降
regex.Pattern = "(?:9(?=8)|8(?=7)|7(?=6)|6(?=5)|5(?=4)|4(?=3)|3(?=2)|2(?=1)|1(?=0)){5}\d"
if regex.test(str) then temp="EDCBA"
'补充AABB AAAA AAABBB AAAB ABBB AABBCC AABBCCDD BBBAAA BAAA.....
..........
regEx.IgnoreCase = True
regEx.Global = True
response.write(temp)
%>