ReplaceTrim 函数之asp实现过滤掉字符中所有的tab和回车和换行的代码
时间:2021-03-03 10:09:31|栏目:ASP代码|点击: 次
'================================================
'函数名:ReplaceTrim
'作 用:过滤掉字符中所有的tab和回车和换行
'================================================
Public Function ReplaceTrim(ByVal strContent)
On Error Resume Next
Dim re
Set re = New RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = "(" & Chr(8) & "|" & Chr(9) & "|" & Chr(10) & "|" & Chr(13) & ")"
strContent = re.Replace(strContent, vbNullString)
Set re = Nothing
ReplaceTrim = strContent
Exit Function
End Function
'函数名:ReplaceTrim
'作 用:过滤掉字符中所有的tab和回车和换行
'================================================
Public Function ReplaceTrim(ByVal strContent)
On Error Resume Next
Dim re
Set re = New RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = "(" & Chr(8) & "|" & Chr(9) & "|" & Chr(10) & "|" & Chr(13) & ")"
strContent = re.Replace(strContent, vbNullString)
Set re = Nothing
ReplaceTrim = strContent
Exit Function
End Function
上一篇:在ASP中连接MySQL数据库,最好的通过ODBC方法
栏 目:ASP代码
本文标题:ReplaceTrim 函数之asp实现过滤掉字符中所有的tab和回车和换行的代码
本文地址:http://www.codeinn.net/misctech/73579.html