复制代码代码如下:
<%
DIMCMD
SetCmd = newCls_command
Classcls_command
Приватор
PublicFunctionIspoSitiveInteger (значение)
Setre = newRegexp
Re.pattern = "^[1-9] [/d]*$"
Re.ignorecase = true
Re.global = true
IspositiveInteger = re.test (значение)
Setre = ничего
Конечная функция
PublicFunctionIsDigit (VString)
Ifvstring = "" thenisdigit = false: exitfunction
Setre = newRegexp
Re.pattern = "^[az]+$"
Re.global = true
Re.ignorecase = true
Re.multiline = true
Isdigit = re.test (vstring)
Setre = ничего
Конечная функция
PublicFunctionIsalpha (Vstring)
Ifvstring = "" thenisalpha = false: exitfunction
Setre = newRegexp
Re.pattern = "^[/d]+$"
Re.global = true
Re.ignorecase = true
Re.multiline = true
Isalpha = re.test (vstring)
Setre = ничего
Конечная функция
PublicFunctionIsalPhadigit (VString)
Ifvstring = "" thenisalphadigit = false: exitfunction
Setre = newRegexp
Re.pattern = "^[a-za-z/d]+$"
Re.global = true