<%
Public Function Ubbcode(strcontent)
dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
'strcontent=Replace(strcontent,"file:","file :")
'strcontent=Replace(strcontent,"files:","files :")
'strcontent=Replace(strcontent,"script:","script :")
'strcontent=Replace(strcontent,"js:","js :")
'图片UBB
re.pattern="\[img\](http|https|ftp):\/\/(.[^\[]*)\[\/img\]"
strcontent=re.replace(strcontent,"<a onfocus=""this.blur()"" href=""$1://$2"" target=new><img src=""$1://$2"" border=""0"" alt=""按此在新窗口浏览图片"" onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></a>")
'链接UBB
re.pattern="(\[url\])(.[^\[]*)(\[url\])"
strcontent= re.replace(strcontent,"<a href=""$2"" target=""new"">$2</a>")
re.pattern="\[url=(.[^\[]*)\]"
strcontent= re.replace(strcontent,"<a href=""$1"" target=""new"">")
'邮箱UBB
re.pattern="(\[email\])(.*?)(\[\/email\])"
strcontent= re.replace(strcontent,"<img align=""absmiddle"" ""src=image/email1.gif""><a href=""mailto:$2"">$2</a>")
re.pattern="\[email=(.[^\[]*)\]"
strcontent= re.replace(strcontent,"<img align=""absmiddle"" src=""image/email1.gif""><a href=""mailto:$1"" target=""new"">")
炎炎设计
慕姐8265434