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
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
ASP 一次下载网页中的所有资源
Oracle临时表空间删除和重建实现过程
Python中requests库的学习方法详解
![](https://img.aspxhome.com/file/2023/5/134835_0s.png)
pytorch教程之网络的构建流程笔记
Python学习笔记之Zip和Enumerate用法实例分析
gulp-htmlmin压缩html的gulp插件实例代码
更新修改后的Python模块方法
![](https://img.aspxhome.com/file/2023/3/109613_0s.png)
Python 统计字数的思路详解
PL/SQL编程经验小结开发者网络Oracle
python基于pygame实现飞机大作战小游戏
![](https://img.aspxhome.com/file/2023/8/81528_0s.jpg)
js仿googl拖拽效果
python 画条形图(柱状图)实例
![](https://img.aspxhome.com/file/2023/8/98968_0s.jpg)
Python函数参数分类原理详解
![](https://img.aspxhome.com/file/2023/1/117951_0s.png)
微信小程序实现列表下拉刷新上拉加载
![](https://img.aspxhome.com/file/2023/8/126158_0s.gif)
Python3.6日志Logging模块简单用法示例
![](https://img.aspxhome.com/file/2023/1/135241_0s.png)
pandas选择或添加列生成新的DataFrame操作示例
python的变量与赋值详细分析
![](https://img.aspxhome.com/file/2023/8/118528_0s.png)
Python列表删除重复元素与图像相似度判断及删除实例代码
![](https://img.aspxhome.com/file/2023/8/97128_0s.png)
PHP中的一些常用函数收集
Python趣味挑战之turtle库绘画飘落的银杏树
![](https://img.aspxhome.com/file/2023/2/86372_0s.png)