ASP中如何判断字符串中是否包含字母和数字

时间:2009-07-10 13:12:00 

ASP中判断字符串中是否包含字母和数字的两个函数

function   isnaw(str)
for   i=1   to   len(str)
str1=mid(str,i,1)
if   isnumeric(str1)   then   isn=1
if   (Asc(str1)> Asc( "a ")       and   Asc(str1) <Asc( "z "))       or       (Asc(str1)> Asc( "A ")       and       Asc(str1) <Asc( "Z "))   then   isw=1
next
if   isn=1   and   isw=1   then
isnaw=true
else
isnaw=false
end   if
end   function

pw= "123qq "
if   isnaw(pw)   then   
response.write   "y "
else
response.write   "n "
end   if



function   checks(c)   
    dim   str,str1
    str1=c
    intlen=len(c)
    for   i=0   to   intlen
    str=   Asc(str1)
            if   (str <48   or   str> 57)and(str <65   or   str> 90)and(str <97   or   str> 122)   then
            checks=0
            else
            checks=1             
            end   if
          str1=right(c,intlen-i)   '依次判断字符ASCII值
            next           
    end   function

标签:字符串,数字,字母
0
投稿

猜你喜欢

  • ASP 一次下载网页中的所有资源

    2008-04-18 13:04:00
  • Oracle临时表空间删除和重建实现过程

    2023-07-18 09:26:04
  • Python中requests库的学习方法详解

    2022-10-13 07:32:36
  • pytorch教程之网络的构建流程笔记

    2021-11-24 10:58:59
  • Python学习笔记之Zip和Enumerate用法实例分析

    2021-09-03 19:58:50
  • gulp-htmlmin压缩html的gulp插件实例代码

    2023-08-06 01:20:18
  • 更新修改后的Python模块方法

    2022-02-20 15:34:09
  • Python 统计字数的思路详解

    2023-01-29 00:17:44
  • PL/SQL编程经验小结开发者网络Oracle

    2010-07-18 13:27:00
  • python基于pygame实现飞机大作战小游戏

    2021-04-27 07:59:17
  • js仿googl拖拽效果

    2007-09-29 13:16:00
  • python 画条形图(柱状图)实例

    2021-12-06 19:09:26
  • Python函数参数分类原理详解

    2022-02-26 17:05:57
  • 微信小程序实现列表下拉刷新上拉加载

    2024-05-21 10:11:26
  • Python3.6日志Logging模块简单用法示例

    2021-03-18 06:47:38
  • pandas选择或添加列生成新的DataFrame操作示例

    2023-03-02 00:41:51
  • python的变量与赋值详细分析

    2022-06-14 23:09:44
  • Python列表删除重复元素与图像相似度判断及删除实例代码

    2021-02-21 05:28:58
  • PHP中的一些常用函数收集

    2023-10-09 02:06:06
  • Python趣味挑战之turtle库绘画飘落的银杏树

    2023-07-21 21:46:40
  • asp之家 网络编程 m.aspxhome.com