论坛UBB代码 推荐(4)


Rem 过滤HTML代码
function HTMLfilter(fString)
if not isnull(fString) then
 fString=server.htmlencode(fString)
 fString = Replace(fString, CHR(9), "   ") 'Tab
' fString = Replace(fString, CHR(34), """)    '"
' fString = Replace(fString, CHR(39), "'")    ''
 fString = Replace(fString, CHR(13), "")      '回车是一个13+10
 fString = Replace(fString, CHR(10) & CHR(10), " <P>")  '
 fString = Replace(fString, CHR(10), " <BR>")
' fString = Replace(fString, CHR(32), "&nbsp;")    ' 空格
 HTMLfilter = fString
end if
end function
%>
<%
Function isemail(strng)
isemail = false
Dim regEx, Match ' Create variables.
Set regEx = New RegExp ' Create a regular expression object (stupid, huh?)
regEx.Pattern = "^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$" ' Sets pattern.
regEx.IgnoreCase = True ' Set case insensitivity.
Set Match = regEx.Execute(strng) ' Execute search.
if match.count then isemail= true
End Function
%>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wfzzzf.html