凤来仪

专业的计算机学习网站

首页 > ASP过滤掉非中文字符

ASP过滤掉非中文字符

点击:965 发布时间:

    在ASP中使用正则表达式过滤掉非中文字符。函数构建代码如下:

Function RegExpTest(strng) 
    i = 0 
    Set regEx = New RegExp 
    regEx.Pattern = "[^\u4e00-\u9fa5]"
    regEx.IgnoreCase = True 
    regEx.Global = True 
RegExpTest= regEx.Replace(strng,"")
End Function