VB过滤字符

网址:amzoo.cn 发布时间:2013/7/1 来源:广州扬帆科技网 人气: 【
大 中 小】
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<%
dim con
con="你好<br>哈 哈"
if con<>"" then
dim content,re
content=con
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="\[align=right\]\[color=#a9a9a9\](.|\n)*\[\/color\]\[\/align\]"
Content=re.Replace(Content,"")
set re=Nothing
content=replace(content,"<br>",chr(13))
content=replace(content," ","")
content=Rtrim(content)
response.Write content
response.end
end if
%>
</body>
</html>