检验函数 asp class
发布时间:2023-09-26 11:06:17 所属栏目:Asp教程 来源:
导读:复制代码 代码如下:
<%
Dim Cmd
Set Cmd = New Cls_Command
Class Cls_Command
Private Re
Public Function IsPositiveInteger(value)
Set Re = New RegExp
Re.Pattern = "^[1-
<%
Dim Cmd
Set Cmd = New Cls_Command
Class Cls_Command
Private Re
Public Function IsPositiveInteger(value)
Set Re = New RegExp
Re.Pattern = "^[1-
复制代码 代码如下: <% Dim Cmd Set Cmd = New Cls_Command Class Cls_Command Private Re Public Function IsPositiveInteger(value) Set Re = New RegExp Re.Pattern = "^[1-9][/d]*$" Re.IgnoreCase = True Re.Global = True IsPositiveInteger = Re.Test(value) Set Re = Nothing End Function Public Function IsDigit(vString) If vString = "" Then IsDigit = False : Exit Function Set Re = New RegExp Re.Pattern = "^[a-z]+$" Re.Global = True Re.IgnoreCase = True Re.MultiLine = True IsDigit = Re.Test(vString) Set Re = Nothing End Function Public Function IsAlpha(vString) If vString = "" Then IsAlpha = False : Exit Function Set Re = New RegExp Re.Pattern = "^[/d]+$" Re.Global = True Re.IgnoreCase = True Re.MultiLine = True IsAlpha = Re.Test(vString) Set Re = Nothing End Function Public Function IsAlphaDigit(vString) If vString = "" Then IsAlphaDigit = False : Exit Function Set Re = New RegExp Re.Pattern = "^[a-zA-Z/d]+$" Re.Global = True Re.IgnoreCase = True Re.MultiLine = True IsAlphaDigit = Re.Test(vString) Set Re = Nothing End Function (编辑:汽车网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐