您的位置:首页 > 编程语言 > ASP

asp 判断上传的文件名称中是否带有中文

2010-11-11 16:12 246 查看
'判断上传的文件名中是否带有中文
Function CheckExp(patrn, strng)
Dim regEx, Match
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = true
regEx.Global = True
Matches = regEx.test(strng)
CheckExp = matches
End Function

Function chkzi2(f_Str)
if Not IsNull(f_Str) Then
if CheckExp("^[^/u4E00-/u9FA5]+$", f_Str)=True then
chkzi2=False '不包含中文
Else
chkzi2=True '包含中文
End If
End If
End Function
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: