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
猜你喜欢
- element-ui自带的图标库还是不够全,还是需要需要引入第三方icon,自己在用的时候一直有些问题,参考了些教程,详细地记录补充下对于我
- 一、UNION和UNION ALL的作用和语法UNION 用于合并两个或多个 SELECT 语句的结果集,并消去表中任何重复行。UNION
- 在深度学习中,经常需要动态调整学习率,以达到更好地训练效果,本文纪录在pytorch中的实现方法,其优化器实例为SGD优化器,其他如Adam
- 一个简单但功能比较完善的自动生成缩略图的函数,可以按需要对图片进行缩放、裁切、锁定宽或高、使用空白填充以下为源码,比较简单,相信很容易看明白
- 【前言】 之前由于小编的错误操作误删了注册表中的一项关于sql的内容,具体删了什么,也忘
- 昨天在书上看到SQL语句优化时,where条件顺序不同,性能不同,这个建议在Oracle11G版本还合适吗?方式1优于方式2? 方式1: s
- QSpinBox 是一个计数器控件,允许用户选择一个整数值,通过单击向上/向下按钮或按键盘上的上/下箭头来增加/减少当前显示的值,当然用户也
- 最近使用python写一些东西,在参考资料的时候发现字典是没有顺序的,那么怎么样按照一定顺序访问字典呐,我找到了一个小方法:假设一个字典是:
- 方法一:使用列表推导式>>> vec = [[1,2,3],[4,5,6],[7,8,9]]>>> ge
- 判断汉字if (System.Text.Encoding.GetEncoding("gb2312").GetBytes(
- 当py文件中引用了库face_recognition但是python中没有安装这个库的时候,就会出现No module named '
- 基础类似于自定义指令,可以用全局方法 Vue.filter() 注册一个自定义过滤器,它接收两个参数:过滤器 ID 和过滤器函数。过滤器函数
- 如何比较两个go对象完全相同在go语言中,要比较两个对象是否完全相同,我们可以使用以下三种方法:方法一:使用reflect.DeepEqua
- 1. Django: Python Web应用开发框架Django 应该是最出名的Python框架,GAE甚至Erlang都有框架受它影响。
- 本文实例讲述了Python进程间通信用法。分享给大家供大家参考。具体如下:#!/usr/bin/env python# -*- coding
- python如何修改索引和行列修改索引修改索引之前是自动生成的索引:使用set_index('以xx字段为索引',inpla
- match()函数只检测RE是不是在string的开始位置匹配, search()会扫描整个string查找匹配, 也就是说match()只
- 判断一个数是否能被另一个整数整除是一个挺简单的问题,一般一个模运算就可以搞定了,懒惰的晓萌还是不想自己做,于是找到你帮他写代码,你就帮帮他吧
- 问:假如我的一个表里含有(a,b,c,d)和(a,b)形成组合键。我能在列值中写这个查询吗?例如: select a,c,d from my
- 在本地安装mysql的服务端,打开cmd,cd到mysql安装目录下的bin目录,bin目录中可以看到多个可执行文件,其中mysqladmi