当前位置:首页 > 通信资讯 > 正文
  1. '####################################
  2. '函数:ishttp[str]
  3. '参数:str,待处理的字符串
  4. '作者:木木
  5. '日期:2007/7/12
  6. '描述:检测HTTP连接地址或地址栏是否以HTTP开头
  7. '示例:<%=ishttp(http://www.zzvips.com)%>
  8. '####################################
  9. Functionishttp(str)
  10. DimregEx
  11. SetregEx=NewRegExp
  12. regEx.Pattern="^(http|HTTP)[A-Za-z]{0,1}://"
  13. ishttp=regEx.Test(str)
  14. Endfunction
  15. 验证邮件地址是否符合标准
  16. <%
  17. '******************************
  18. '函数:isemail(strng)
  19. '参数:strng,待验证的邮件地址
  20. '作者:阿里西西
  21. '日期:2007/7/13
  22. '描述:验证邮件地址是否符合标准
  23. '示例:<%=isemail(ali@zzvips.com)%>
  24. '******************************
  25. Functionisemail(strng)
  26. isemail=false
  27. DimregEx,Match
  28. SetregEx=NewRegExp
  29. regEx.Pattern="^w+((-w+)|(.w+))*@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+)*.[A-Za-z0-9]+$"
  30. regEx.IgnoreCase=True
  31. SetMatch=regEx.Execute(strng)
  32. ifmatch.countthenisemail=true
  33. EndFunction
  34. %>
  35. 正则表达式检测中国移动电话手机号码'*********************************************************
  36. '函数:mobilecheck[str]
  37. '参数:str,待处理的字符串
  38. '作者:木木
  39. '日期:2007/7/12
  40. '描述:检测移动电话手机号码
  41. '示例:<%=mobilecheck("13912345678")%>
  42. '*********************************************************
  43. Functionmobilecheck(str)
  44. DimregEx
  45. SetregEx=NewRegExp
  46. regEx.Pattern="^(13[4-9]|15(8|9))d{8}$"
  47. mobilecheck=regEx.Test(str)
  48. EndFunction
如果您对该产品感兴趣,请填写办理(客服微信:xiaoxiongyidong)

为您推荐:

发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。