易截截图软件、单文件、免安装、纯绿色、仅160KB

asp正则表达式判断是否是数字

'判断是否是数字(包括整数和浮点数)
function IsNumber(str)
if RegPatrn("^-?[1-9]\d*$",str) or RegPatrn("^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$",str) then
IsNumber=true
else
IsNumber=false
end if
end function
'正则表达式判断是否匹配
Function RegPatrn(patrn, strng)
RegPatrn = false
Dim regEx, Match, Matches '建立变量。
Set regEx = New RegExp '建立正则表达式。
regEx.Pattern = patrn'设置模式。
regEx.IgnoreCase = True '设置是否区分字符大小写。
regEx.Global = True '设置全局可用性。
If regEx.Test(strng) Then
RegPatrn=true
End if
End Function


相关文档:

asp replace函数的使用

如id="a/b/c/asdf.html" 参数为动态
怎么把后面的asdf.html过滤?使id="a/b/c/"?
如果id的格式一定为 "????/????/??????/xxxx.xxx"
即最后所要过滤掉的一定是最后一个"/"之后的内容
可以用如下方法:
<%
URL="a/b/c/asdf.html"
PartOfURL=split(URL,"/")     '将字符串以"/"分割
UnNeed=spli ......

远程获取类Asp xmlHttp

编者注:这个class主要用于操作asp中的xmlhttp。
  
首先是类定义 Cls_AspHttp.asp:
<%
''=================================================================
''飞扬远程获取类(AspHttp) 1.0.1 Bate1
''   By 奔腾的心
''   2006-04-19
''=========================================================== ......

asp操作XML

Dim xmlDoc
NewsConfigFile=server.MapPath("/test.xml")
Set xmlDoc=Server.CreateObject("msxml2.FreeThreadedDOMDocument.3.0")
If Not xmlDoc.load(NewsConfigFile) Then
 'XmlDoc.loadxml "<?xml version=""1.0"" encoding=""gb2312""?><NewscodeInfo/>"
 response.Write("不存在数据")
& ......

ASP中MD5加密代码

<%
Private Const BITS_TO_A_BYTE = 8
Private Const BYTES_TO_A_WORD = 4
Private Const BITS_TO_A_WORD = 32
Private m_lOnBits(30)
Private m_l2Power(30)

Private Function LShift(lValue, iShiftBits)
If iShiftBits = 0 Then
LShift = lValue
Exit Function
ElseIf iShiftBi ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号