當前位置:編程學習大全網 - 網站源碼 - asp中如何使用正則表達式驗證郵箱的合法,具體點啊

asp中如何使用正則表達式驗證郵箱的合法,具體點啊

--------------郵箱的正則借用上邊兄弟的

Set regEx = New RegExp ' 建立正則表達式。

regEx.Pattern = "^([a-zA-Z0-9]|[._])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+" ' 設置模式。

regEx.IgnoreCase = True ' 設置是否區分字符大小寫。

regEx.Global = True ' 設置全局可用性。

str="11122@163.com"

if regEx.test(str)=true then

Response.Write("合法")

else

Response.Write("不合法")

end if

  • 上一篇:PS裏面怎麽把PNG圖片轉換成GIF動畫
  • 下一篇:天天酷跑黃金獎池抽完要多少獎券
  • copyright 2024編程學習大全網