asp正则式如何定义,以及如何获取其值

来源:百度知道 编辑:UC知道 时间:2024/06/28 02:13:05
最好给个例子。。

用JS判断吧:

function chkword(val){
var rg=/^\d*$/;//是否整数
if(rg.test(val)){
alert("是整数");
}else{
alert("不是整数");
}
}

Dim ss, re, rv
ss = "Is is the cost of of gasoline going up up?." & vbNewLine
Set re = New RegExp
re.Pattern = "\b([a-z]+) \1\b"
re.Global = True '是否全局
re.IgnoreCase = True '是否无视大小写
rv = re.Replace(ss,"$1")