asp 连接数据库代码实例
re.Pattern="[align=(center|left|right)](.*)[/align]"
strContent=re.Replace(strContent,"<div align=$1>$2</div>")
re.Pattern="[QUOTE](.*)[/QUOTE]"
strContent=re.Replace(strContent,"<table style=""width:80%"" cellpadding=5 cellspacing=1 class=tableborder1><TR><TD class=tableborder1>$1</td></tr></table><br>")
re.Pattern="[fly](.*)[/fly]"
strContent=re.Replace(strContent,"<marquee width=90% behavior=alternate scrollamount=3>$1</marquee>")
re.Pattern="[move](.*)[/move]"
strContent=re.Replace(strContent,"<MARQUEE scrollamount=3>$1</marquee>") re.Pattern="[GLOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)](.[^[]*)[/GLOW]"
strContent=re.Replace(strContent,"<table width=$1 style=""filter:glow(color=$2, strength=$3)"">$4</table>")
re.Pattern="[SHADOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)](.[^[]*)[/SHADOW]"
strContent=re.Replace(strContent,"<table width=$1 style=""filter:shadow(color=$2, strength=$3)"">$4</table>")
re.Pattern="[i](.[^[]*)[/i]"
strContent=re.Replace(strContent,"<i>$1</i>")
re.Pattern="[u](.[^[]*)([/u])"
strContent=re.Replace(strContent,"<u>$1</u>")
re.Pattern="[b](.[^[]*)([/b])"
strContent=re.Replace(strContent,"<b>$1</b>")
re.Pattern="[size=([1-4])](.[^[]*)[/size]"
strContent=re.Replace(strContent,"<font size=$1>$2</font>")
strContent=replace(strContent,"<I></I>","")
set re=Nothing
UBBCode=strContent
end function
Function FilterJS(v)
if not isnull(v) then
dim t
dim re
dim reContent
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="(javascript)"
t=re.Replace(v,"javascript")
re.Pattern="(jscript:)"
t=re.Replace(t,"jscript:")