【Asp】判断字符串只能是数字或字母组合

admin 2021年4月3日19:03:00评论23 views字数 386阅读1分17秒阅读模式

Asp判断字符串只能是数字或字母组合



if request("txt")""   then
Dim regEx
Set regEx = New RegExp
regEx.Pattern = "^[a-zA-Z][^W_]*$"
if regEx.test(request("txt")) = true then
response.write "正确"
else
response.write "错,只允许字母开头的 字母或数字组合!"
end if
Set regEx =nothing
end if
%>

文章来源于lcx.cc:【Asp】判断字符串只能是数字或字母组合

相关推荐: 【批处理】批处理、Bat 也能显示漂亮的进度条

批处理、Bat 也能显示漂亮的进度条: mode con cols=113 lines=15 &color a :starthome cls set a=^set /p=■%b%^nul^& echo. echo  程序正在初始化. . . e…

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月3日19:03:00
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【Asp】判断字符串只能是数字或字母组合https://cn-sec.com/archives/319716.html

发表评论

匿名网友 填写信息