Asp中使用正则表达式
正则表达式应用广泛且强大,那么如何在Asp中使用正则表达式呢?
直接进入方法:
‘验证是否可以作为用户名
Function IsUserName(str)
Dim re : Set re = new RegEXP
re.IgnoreCase = false
re.global = false
re.Pattern = "^(?!\\d)[a-zA-Z0-9\\u4e00-\\u9fa5]+$"
IsUserName = re.Test(str)
End Function
Related posts:
发表评论
| Trackback
