[求助]ASP只能输入小数或整数的正则表达式
ASP只能输入小数或整数的正则表达式
function CheckPattern(str,pat)
set r=new regexp
r.Pattern=pat
r.IgnoreCase=false
r.Global=false
if r.Test(str) then
CheckPattern=true
else
CheckPattern=false
end if
end Function
const Reg_PatNum = "^\d+(\.{1}\d+)?$"
Dim myNum
myNum = Request("myNum")
Response.Write(CheckPattern(myNum,Reg_PatNum))
%>[/QUOTE]
[此贴子已经被作者于2007-3-22 8:43:46编辑过]