正則表達式簡單的檢查輸入email是否合法程序
更新時間:2007年04月06日 00:00:00 作者:
function chkEmail(email)
on error resume next
dim i,l,pos1,pos2
chkEmail=true
if isnull(email) then chkEmail=false:exit function
pos1= instr(email,"@")
pos2=instrRev(email,".")
if not(pos1>0) or not (pos2>0) or pos1>pos2 then
chkEmail=false
end if
if err.number<>0 then err.clear
end function
on error resume next
dim i,l,pos1,pos2
chkEmail=true
if isnull(email) then chkEmail=false:exit function
pos1= instr(email,"@")
pos2=instrRev(email,".")
if not(pos1>0) or not (pos2>0) or pos1>pos2 then
chkEmail=false
end if
if err.number<>0 then err.clear
end function
相關文章
使用正則表達式過濾 S3 上以 _$folder$ 結尾的占位文件的方法
當我們使用命令行批量從 S3 上拷貝文件或統(tǒng)計文件數(shù)量時,希望能排除掉 S3 上以 _$folder$ 結尾的占位文件,這個正則表達式應該怎么寫呢,本文給大家介紹使用正則表達式過濾 S3 上以 _$folder$ 結尾的占位文件的方法,感興趣的朋友一起看看吧2023-12-12javascript 獲取url參數(shù)的正則表達式(用來獲取某個參數(shù)值)
javascript 傳多個參數(shù)的正則表達式(用來獲取某個參數(shù)值) ,腳本之家之前發(fā)布通過函數(shù)獲取url參數(shù)的代碼不是正則表達式。2010-01-01